I\'ve seen many people use the following code:
Type t = typeof(obj1); if (t == typeof(int)) // Some code here
But I know you could also
I believe the last one also looks at inheritance (e.g. Dog is Animal == true), which is better in most cases.