c# get type of object

C#
//Exact runtime type of the current instance.
object.GetType();use the "is" keyword
string a = "This is a string";
Console.WriteLine(a.GetType())
Source

Also in C#: