I
iCeCLoW
What is the difference between doing this:
if (myClass is Class)
{
//Do something here
}
and this?:
if (myClass.GetType() == typeof(Class))
{
//Do something here
}
Because in some cases the first expression evaluates to false but the
second expression remains true. When this happens I can always cast
myClass to the type Class.
What I´m missing here?
Thanks in advance
if (myClass is Class)
{
//Do something here
}
and this?:
if (myClass.GetType() == typeof(Class))
{
//Do something here
}
Because in some cases the first expression evaluates to false but the
second expression remains true. When this happens I can always cast
myClass to the type Class.
What I´m missing here?
Thanks in advance