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:
00855085
Views:
15
I thought that I had tried casting to Int but it told me something about not being able to convert object to int. I'll try that again.

I recall that "Typed Datasets" was the title of the next section in the book I'm reading -- guess I should have pushed a little further into it last night. :)

Thanks.

>Well, there are two ways. You could use a typed ADO.NET dataset, so when you get that column from your DataRow you would not get an object but a decimal.
>
>
>CustomDataSet ds = new CustomDataSet();
>int RowNumber = 0;
>if(ds.MyTable[RowNumber].SalesMin > 0) {
>etc..
>
>
>The other way is to cast the object to an int
>
>(int)dsQuery["SalesMin"] > 0
>
>
>You will run into problems if you are trying to cast a null object though.
Previous
Reply
Map
View

Click here to load this message in the networking platform