how to store null value in datetime in c# .net 1.1

  • Thread starter Thread starter HemantShri
  • Start date Start date
H

HemantShri

hi frnds,
i have to store null value in c#.net 1.1 can some one help
me out ???

Thanks & Regards,
Hemant Shrivastava
 
HemantShri said:
hi frnds,
i have to store null value in c#.net 1.1 can some one help
me out ???

Thanks & Regards,
Hemant Shrivastava

You can either:
1) Store it as an object
2) Create a wrapper class that just has a public DateTime property
3) Use DateTime.MinValue to represent null and convert to/from when going to
the database.

I use no 3 myself but whatever you use you should make sure you make a
decision and stick to it throughout your app.

Michael
 
Back
Top