Use case example for explicit interface member implementation
Generally, i do understand what interface is and that to invoke a method of a particular explicit interface member implementation, you need to instantiate that particular implementor class as that specific interface type. Take for example (in C#): interface ISampleInterface { void SampleMethod(); } class ImplementationClass : ISampleInterface { // Explicit interface member implementation: void ISampleInterface.SampleMethod() { // Method implementation. } static void Main() { // Declare an interface instance. ISampleInterface obj = new ImplementationClass(); ImplementationClass obj1 = new ImplementationClass(); // Call the member. obj.SampleMethod(); //obj1.Print(); // Error -> Cannot access explicit implementation of Print() } } What i would like to know if anyone can give me a good use case for this type of implementation or a brief example. Cheers and thanks.