You can determine if an object is of a specific class by using the typeof keyword.

[csharp]

if (myObj.GetType() == typeof(MyClass))
{
// Do something

}[/csharp]

If you want to check to see if an object is of a specific type, or can be cast to a specific type then use the is operator.
[csharp]

if (myObj is MyClass)
{
// Do something
}
[/csharp]