Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
> operator vs. datarow column of System.Decimal type?
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00855035
Message ID:
00855167
Views:
26
Yes, thanks. It turns out that once you cast it to a temporary Decimal type, the regular old > operator works (as did the CompareTo() call, but this is shorter/clearer).
decimal SalesMin = (decimal)drQuery["SalesMin"];
if (SalesMin > 0)
...
I'm somewhat surprised that casting and comparing in one step didn't work, but the above is prettier than all of the previous versions I had working. Thanks.

>Can you assign the value to a variable of type decimal, and then compare the variable with the ">" ? Ugly, but might work since .NET will do some of the casting for you.
Previous
Reply
Map
View

Click here to load this message in the networking platform