types
using System.Reflection;
public class SampleClass { }
public class Program {
public static void Main() {
var o = new SampleClass ();
if (o.GetType() == typeof(String))
Console.WriteLine ("yay");
else
Console.WriteLine ("boo");
}
}