a question regarding SqlDbType.Money

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?
 
J

Jon Skeet [C# MVP]

.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top