C# Language Get a System.Type


Example

For an instance of a type:

var theString = "hello";
var theType = theString.GetType();

From the type itself:

var theType = typeof(string);