In ASP.NEt 1.1 or in 2.0 without a nullable type, you would use DbNull.Value
if (x == DbNull.Value)
{
//is null
}
In 2.0, you have nullable types. I assume you are not using them however, or
are using VB.NET. In VB.NET 2.0, you use
Dim nullable1 As Nullable(Of DateTime) = New Nullable(Of DateTime)
If Not nullable1.HasValue Then
End If
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
*************************************************
Think outside of the box!
*************************************************
"shapper" <md*****@gmail.comwrote in message
news:11*********************@e3g2000cwe.googlegrou ps.com...
Hello,
Inside a class I have 4 propertiy types:
1. String
2. Boolean
3. Mail.MailPriority
4. Mail.MailAddressCollection
I need to check if each property is null, i.e., if it wasn't defined
any value for them.
How can I do it?
I tried NULL but it got an error to use System.DBNull but I got error
again.
Thanks,
Miguel