If you look at the LLBLGEN generated classes they use SqlInt32 for the internal properties of the data classes so that any integer fields that may need to be null can be set to null within the code. Whilst I tend not to use the classes as they stand they have given me some good ideas to use for such tasks, the use of the SqlInt32 being one of them. I like it - can do things more elegantly than with the style of data classes mooted for VB6.
http://www.sd.nl/software/ Just thought I'd mention it. Cheers, Iain 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.unsub%% --------- 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/ Disclaimer This message may contain information which is legally privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. Such notification not withstanding, any comments or opinions expressed are those of the originator, not of Taylor Made Computer Solutions, unless otherwise explicitly stated. --- 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/
