Value Types cannot be null. An unitialized value type is always given its
default value (0 for integers in your case). So you can't test for null,
nor can you rightfully test for 0, since 0 is a valid value that you might
set your int to.. So to answer your question, I'd rethink your logic, use a
SqlDataType instead (SqlInt32) or something else to test.

adam..

>This is what I need to do..
>
>int i;
>if (i =! null)
>            Response.Write(i);
>
>i = null;
>
>
>Obviously, the compiler says you can't convert a null to int though, so
>is there a simple way to do this or do I need to rethink my logic?




---
You are currently subscribed to dotnet as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/


Reply via email to