I don't know if this is helpful or not. What about using a SqlDateTime found in System.Data.SqlTypes? I understand the SqlTypes classes are used for representing Microsoft SQL Server data types, such as, SqlDataTime represents a SQL Server datetime.
SqlDateTime allows a DBNull. -----Original Message----- From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of Yves Reynhout Sent: Monday, May 13, 2002 6:03 AM To: [EMAIL PROTECTED] Subject: [DOTNET] DateTime, C# and null Hi, what if I had a webservice method which takes a DateTime parameter and I want to be able to NOT specify this parameter (i.e. pass null as a value). One might suggest to use overloading (and run in to the trouble of having to give each webservice method a unique name(in the wsdl), but let's not delve into that one), but frankly that's not what I want. The same question arises (how do I properly handle null with valuetypes such as int, datetime, ...) when creating [business] objects. Am I obligated to revert to a homegrown datetime class, int class, etc... just to be able to handle the null situation? What is common practice? How can this problem be tackled in an OO-minded fashion? Awaiting your responses... You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.