I need to convert float to int (single precision, 32 bits) like:
‘float: 2 (hex: 40000000) to int: 1073741824’. Any idea how to implement that?
I was looking for it in msdn help but with no result.
I need to convert float to int (single precision, 32 bits) like: ‘float: 2
Share
If your aiming for versions less than .Net 4 where BitConverter isn’t available, or you want to convert floats to 32 bit ints, use a memory stream:
It is a bit long winded though.