how to find the type of a variable in c# code example Example: get type of variable c# string a = "This is a string"; Console.WriteLine(a.GetType())