Splitting a double in two, C#
Posted
by Stacey
on Stack Overflow
See other posts from Stack Overflow
or by Stacey
Published on 2010-05-25T17:53:40Z
Indexed on
2010/05/25
18:01 UTC
Read the original article
Hit count: 152
c#
I'm attempting to use a double to represent a bit of a dual-value type in a database that must sometimes accept two values, and sometimes accept only one (int).
So the field is a float in the database, and in my C# code, it is a double (since mapping it via EF makes it a double for some reason... )
So basically what I want to do .. let's say 2.5 is the value. I want to separate that out into 2, and 5. Is there any implicit way to go about this?
© Stack Overflow or respective owner