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...


Popular posts from this blog

Creating PDF with ASP.Net MVC and RazorPDF

Horizontal and vertical scrollbar in HTML5 and CSS3

How to create Rest API(Web API) with ASP.NET Core 1.0