Implicitly Typed Local Variables – var
ธนากฤต โชคอำนวย 650710081
public class GFG {
static public void Main()
{
var a = 50;
var b = "Welcome! Geeks";
var c = 340.67d;
var d = false;
Console.WriteLine("Type of 'a' is : {0} ", a.GetType());
Console.WriteLine("Type of 'b' is : {0} ", b.GetType());
Console.WriteLine("Type of 'c' is : {0} ", c.GetType());
Console.WriteLine("Type of 'd' is : {0} ", d.GetType());
}
}Type of 'a' is : System.Int32
Type of 'b' is : System.String
Type of 'c' is : System.Double
Type of 'd' is : System.Boolean Last updated
