Hi, folks here is the new trick to create the nullable datatypes in csharp..
As sometimes we need to pass the null data in the application we can use this formula...
So how can we make the datatypes like DateTime or Integer as a nullable
here is the tip.
Enjoy...
if we create the types in a following manner it can not accept the null values..
DateTime date = new DateTime();
date = null;
or
int i = null
and if we want to pass the null values to there variables we can declare them in the following manner..
DateTime? date = new
DateTime();
date = null;
int? i = null
..Wish u a very happy programming ..!
0 comments:
Post a Comment