How to

get object type

Published: 9. October 2011 | Updated: 9. October 2011
License: Microsoft Public License (MS-PL)
Categories: Framework » Reflection
Tags: C# Reflection
Was this snippet helpful for you? YESYES / NONO
string myObj = "test";

Type type = myObj.GetType();

Console.WriteLine(type);
Console Output:
System.String
Send us feedback about this snippet »



Related Snippets: