In Actionscript you can have a variable hold a reference to a class type and then compare an instance of a class to the variable with is
. Example:
var a:Foo = new Foo();
var type:Class = Foo;
if(a is type){ //this is true
//do something
}
Can you do something similar in C#? Or does the "is" keyword always have to be followed by a class?