Is there a better (shorter?) way than the following?
let cpucount = System.UInt16.Parse( reader.GetInt32(3).ToString() )
Is there a better (shorter?) way than the following?
let cpucount = System.UInt16.Parse( reader.GetInt32(3).ToString() )
I don't know F#, but you could write Convert.ToUint16(reader.GetInt32(3))
.
EDIT: According to MSDN, you can cast by writing uint16 reader.GetInt32(3)
.