Why is the following allowed:
public class Foo { public Foo() { ... } public void Foo() { ... } }
Is there ever a valid reason for nami
I cannot see a valid reason for it.
C# provides a compiler error - "Member Names Cannot Be The Same As Their Enclosing Type"
It could be quite confusing, especially when using reflection to look at the composition of an object.