What's the logic in this behavior?
On 11/30/2012 9:04 PM, Gor Gyolchanyan wrote:Normal, since the typeids of interfaces are not the same as for classes.
interface I { }
class C: I { }
I object = new C;
assert(typeid(object) == typeid(C)); // fails
Is this normal or is it a bug?
That works, because classes are classes. Classes are not interfaces.
Note, that the same works fine in case of a base class, rather then an
interface.