An explicit interface implementation is a kind of intermediate house between public and private: it is publicly accessible if you use the interface link to get it, but this is the only way to access it (even in the same class).
, , , - , . , :
public class Foo : IBar
{
public string GetQueryString()
{
}
string IBar.GetQueryString()
{
}
}
, , IEnumerable<T>, GetEnumerator , :
public class Foo : IEnumerable<string>
{
public IEnumerator<string> GetEnumerator()
{
...
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}
, .