Suppose you have the following interfaces:
interface IBase {
int Property { get; }
}
interface IDerived : IBase {
new int Property { get; } // this hides IBase.Property
}
A possible implementation of IDerived can have two implementations of the Property getter (via explicit implementation).
If you have some instance of IDerived and want to to call IBase's Property getter, you need a cast on the call site. However, ILSpy doesn't generate a cast.
IDerived instance = ...;
int x = ((IBase)instance).Property; //ILSpy doesn't generate this cast, calling the wrong property
Suppose you have the following interfaces:
A possible implementation of IDerived can have two implementations of the Property getter (via explicit implementation).
If you have some instance of IDerived and want to to call IBase's Property getter, you need a cast on the call site. However, ILSpy doesn't generate a cast.