Tuesday, March 16, 2010

How to Get the Type Name

By using the .NET method GetType, we can get the type name of any local variable or object. This is how to use it:
Console.WriteLine(myVariable.GetType());

No comments:

Post a Comment