It gives the following compilation error. Type 'WpfAppln1.Test' already reserves a member called 'set_Foo' with the same parameter types
When we define a property in c#, get_PropName and set_PropName methods gets allocated by the compiler for get and set(that we usually define within the property), so that the class should not have same method names irrespective of the return type. I think my understanding is correct, if not let me know.
2 comments:
public int set_Foo(int value) {
m_foo = value;
}
Was method meant to be void?
It gives the following compilation error.
Type 'WpfAppln1.Test' already reserves a member called 'set_Foo' with the same parameter types
When we define a property in c#, get_PropName and set_PropName methods gets allocated by the compiler for get and set(that we usually define within the property), so that the class should not have same method names irrespective of the return type. I think my understanding is correct, if not let me know.
Post a Comment