declare public, then I can only implement method with this syntax. Why can't be just GetEnumerator, without IEnumerable. ?
2 reason. 1- you have a method with same name and input but different output. 2- it make interface methods kinda hidden
Reason 1 actually common when implementing IEnumerable. Because you normally also implementing IEnumerable<T>
Обсуждают сегодня