23
1
using System;
2
3
namespace ImplicitTypeSample
4
{
5
public class Program
6
{
7
public static void Main(string[] args)
8
{
9
var name = "John";
10
var age = 22;
11
12
Console.WriteLine("{0} is {1} years old", name, age);
13
14
name = "Martin";
15
age = 30;
16
17
Console.WriteLine("{0} is {1} years old", name, age);
18
19
Console.WriteLine(name.GetType());
20
Console.WriteLine(age.GetType());
21
}
22
}
23
}
Cached Result