Concept of Nullbale values in C#
using System;
public class NullValue
{
public static
void Main(String[] args)
{
int ?num1 =
null;
int? num2 = 45;
Console.WriteLine("Values are:{0},{1}",num1,num2);
Console.ReadLine();
}
}
// here {0} and {1} are placeHolders
// also we can write it as
//Console.WriteLine("Values are:"+num1+" "+num2);
// here {0} and {1} are placeHolders
// also we can write it as
//Console.WriteLine("Values are:"+num1+" "+num2);
output:
No comments:
Post a Comment