Can someone explain how an intereface can be forced to be implemented as private or public. Usually when I define an interface, every method/property are public. In the example, using "IEnumerable" produce a public method "GetEnumerator()" but using the interface "IEnumerable" the method "IEnumerable.GetEnumerator()" is private by default.
public class customEnumerable<T> : IEnumerable<T>, IEnumerable
{
public IEnumerator<T> GetEnumerator()
{
throw new NotImplementedException();
}
IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
throw new NotImplementedException();
}
}
Thanks!