Link to home
Start Free TrialLog in
Avatar of Prysson
Prysson

asked on

What c# variable type do I use to work with SQL money data types?

What c# variable type do I use to work with SQL money data types?

If I am pulling a "money" data type out of a sql query and need to set that value to a variable to work with it in c# what is teh proper variable type..how do you covert it?
SOLUTION
Avatar of Si_Hibbard
Si_Hibbard
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
oops mistyped the format shoud be "{0:c}"
ASKER CERTIFIED SOLUTION
Avatar of dave4dl
dave4dl

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dave4dl
dave4dl

Woops, clicked submit too quickly.
I wanted to add that if you use the double type versus the decimal your code will be more efficient even though they will both work.