Tuesday, August 1, 2006

Insert NUll in value datatype like int,float in C#

Some times we need to make some data type to null. Like
in some cases like stored procedure in database.

We can do it in C# very easily. by just putting ?sign in'
the definition like below:

int? a;

that's it! you have created a value data type with null
database. If you don't supply a value to the int a then
it will remain null.

You can use this for any value data type like short,single,
double,long,decimal etc.

Happy Programming...
Share:

0 comments:

Post a Comment

Your feedback is very important to me. Please provide your feedback via putting comments.

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews