c# get type var code example Example: get type of variable c# Click to copystring a = "This is a string"; Console.WriteLine(a.GetType())