Simple example and concepts of nullable.

Amatya
Posted by Amatya under C# category on | Points: 40 | Views : 687
Concepts of nullable.

Nullables - C# have a fantastic data types which is called as NULLABLE.Here you can assign range of values as well as null values.

Example

int? dnf1 = null;
int? dnf2 = 100;
double? dnf3 = new double?();
double? dnf4 = 1.18;
bool? dnf5 = new bool?();
Console.WriteLine(dnf1, dnf2,dnf3, dnf4);
Console.WriteLine("Nullable", dnf5);



Output
,100, ,1.16

Comments or Responses

Login to post response