The .NETproperties must be first-class citizens, however in the code properties ILgetter and seters are implemented as get_PropertyName and set_PropertyName.
class Property
{
int Value { get { return 42; } }
int get_Value() { return 6 * 9; }
void set_Value(int i) { }
}
Output:
error CS0082: Type "SO.Property" already reserves a member named "get_Value" with the same parameters
error CS0082: Type "SO.Property" already reserves a member named "set_Value" with the same parameters
Why did the designers .NETdecide to use a name that might interfere with the user code? They could use an illegal character (as Java uses $for the inner class).
Motti