Hacker News new | past | comments | ask | show | jobs | submit login

> That you cannot call interface methods on an object implementing the interface without explicitly casting to the interface [1] is pretty weird.

That's probably because in C#/.NET you can specify methods that are only valid when being used as this exact interface. Those are called explicit interface implementations and can contain completely different code than the class method.

https://docs.microsoft.com/en-us/dotnet/csharp/programming-g...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: