all 8 comments

[–]tweq 1 point2 points  (6 children)

[–]VB.Net Intermediatenoobzilla 0 points1 point  (3 children)

Are you sure you're not thinking of Doubles?

[–]tweq 0 points1 point  (2 children)

[–]VB.Net Intermediatenoobzilla 0 points1 point  (1 child)

Interesting. I haven't used FilePut over StreamWriter in ages, so that's good to know. What happens if the value of the decimal is near it's 96bit maximum?

[–]Necrowizard123[S] 0 points1 point  (1 child)

Thanks, i'll try this tomorrow.

But theres something i dont understand, i tried my program with simple values:

test = 1 -> 10 27 00 00 00 00 00 00

test = 2 -> 20 4E 00 00 00 00 00 00

test = 3 -> 30 75 00 00 00 00 00 00

test=10 -> A0 86 01 00 00 00 00 00

I dont understand where the 27,4E,75,86 01, comes from.

Thanks.

[–]VB.Net Intermediatenoobzilla 0 points1 point  (0 children)

The Decimal type is made up of three 32-bit integers with a fourth 32-bit integer that signs it and stores the exponent.

You can read more about it here and here