G
GeezerButler
I have a class A derived from interface B.
I create object of A (using reflection) and then i try to cast the
object A to type B,
object objA = MyReflectionFunction("classA");
B objB = (B) objA; //Exception thrown here
I get Invalid cast exception.
Now the funnier part is that before/after the offending line is
executed, if i copy
B objB = (B) objA;
to the immediate window is VS2005, then it gets executed without a
problem.
This has me stumped now for the last few hours.
Can you help in any way.
Thanks!
I create object of A (using reflection) and then i try to cast the
object A to type B,
object objA = MyReflectionFunction("classA");
B objB = (B) objA; //Exception thrown here
I get Invalid cast exception.
Now the funnier part is that before/after the offending line is
executed, if i copy
B objB = (B) objA;
to the immediate window is VS2005, then it gets executed without a
problem.
This has me stumped now for the last few hours.
Can you help in any way.
Thanks!