My application uses a boxed Type
object for which I later need to evaluate that it is of type Type
, before unboxing. This is implemented like so...
public void MyFunc(params Object[] args)
{
Debug.Assert(args[0].GetType().Equals(typeof(Type)));
}
This always evaluates as false, even though I can inspect the argument in the debugger and see that it is correct. Any ideas?