davesnb
asked on
convert member property to type int
Hello EE,
I have a member in a system.object of typename
TypeName: System.Management.Automati on.PSCusto mObject
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
name NoteProperty System.String name=tbl_Core_Auditing
TableDataSizeMB NoteProperty System.String TableDataSizeMB=5283
As you can see there is tabledatasizemb as type system.string , i wish to convert this to int32 for each element in the array
I have a member in a system.object of typename
TypeName: System.Management.Automati
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
name NoteProperty System.String name=tbl_Core_Auditing
TableDataSizeMB NoteProperty System.String TableDataSizeMB=5283
As you can see there is tabledatasizemb as type system.string , i wish to convert this to int32 for each element in the array
ASKER
$tblsize = import-csv C:\Scripts\dump\tblsize\$datelog.csv
$tblsize | Int32.Parse($tblsize.TableDataSizeMB)
Sorry not familiar with the syntax here , returns " The term 'Int32.Parse' is not recognized as the name of a cmdlet.." when using Int32.Parse($tblsize.Tabel
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
great thanks
http://msdn.microsoft.com/en-us/library/system.int32.parse%28v=vs.110%29.aspx