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

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
 
M

Michael C

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top