say I have:
class Test
{
public static int Hello = 5;
}
This obviously works:
int j = Test.Hello;
But why should this not work?
Test test = new Test();
int j = test.Hello;
The instance could not have a member equally named, so I don't see how this could be ambiguous or unresolvable for a compiler.
Anyone any idea why this is?
EDIT: Is there any other technical reason why this should be OTHER than the language designers choosing this for readability/clarity/aesthetics/etc?