a question regarding SqlDbType.Money

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

hey

..net 2.0

I have some .net code which calls a stored procedure. This stored procedure
returns a value of SqlDbType.Money... I'm wondering what datatype I should
use on the variable which get this return value.... I've used Double, but
I'm not 100% sure that is correct.. maybe Decimal should be used instead?

what's your thoughts about this?
 
.net 2.0

I have some .net code which calls a stored procedure. This stored procedure
returns a value of SqlDbType.Money... I'm wondering what datatype I should
use on the variable which get this return value.... I've used Double, but
I'm not 100% sure that is correct.. maybe Decimal should be used instead?

what's your thoughts about this?

Yes, you should use decimal. For more about decimal/double, read these
articles:

http://pobox.com/~skeet/csharp/floatingpoint.html
http://pobox.com/~skeet/csharp/decimal.html

Jon
 
Back
Top