Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
> operator vs. datarow column of System.Decimal type?
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00855035
Message ID:
00855167
Vues:
25
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform