Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Handling DB Nulls
Message
General information
Forum:
ASP.NET
Category:
Class design
Miscellaneous
Thread ID:
01440804
Message ID:
01440895
Views:
29
>>>I don't see GetNonNull in intellisense.
>>>
>>>What am I doing wrong?
>>
>>string _ProjectName = ds.Tables[0].Rows[0]["ProjectName"].ToString();
>>
>>_ProjectName = _ProjectName.GetNonNull(); // would this work?
>
>Not for non-string values. If the data type of the column is int and it's null, it would error before it got to the GetNonNull line.

Did you try using var or int? ?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform