When you explicitly implement an interface member in a class, you make the member accessible only through objects whose type is the interface and not through objects whose type is the class.
1 2 3 4 5 6 7 8 | public class Cow : IMoo{ void IMoo.Moo() { Console.WriteLine(string.Format("{0} says Moo", Name)); } // rest of class here |
1 2 3 4 5 6 | Cow bessie = new Cow("Bessie", 5);// bessie.Moo(); // Compile-time errorIMoo viaMoo = bessie;viaMoo.Moo(); // OK |
Because explicitly implemented interface members are not accessible via normal class instances, all explicitly implemented members are implicitly private. These members cannot include an access modifier (either private orpublic).

