c# type get type code example
Example 1: c# get type of object
//Exact runtime type of the current instance.
object.GetType();
Example 2: get type of variable c#
string a = "This is a string";
Console.WriteLine(a.GetType())
//Exact runtime type of the current instance.
object.GetType();
string a = "This is a string";
Console.WriteLine(a.GetType())