| Author: satya priya arya 10 Jan 2007 | Member Level: Bronze Points : 0 |
Let me create a property named "myProp" which created 2 method in IL named "get_myProp()" and "set_myProp()". Its OK.
Now i created 2 method in my code itself named get_myProp(), and set_myProp(). Does compiler allow to create method with different names?
If not, why? bcz as a user point of view, user never defined any method with named get_myProp(), and set_myProp().
Thanks Satya
|
| Author: Ajit Singh Shekhawat 10 Jan 2007 | Member Level: Bronze Points : 0 |
Thank you very much Satya for your question.
When you create a property (myProp) in a class and try to create functions which named get_myProp(), and set_myProp(), you will get a compilation error because these methods are already created by IL in your class.
Offcourse yes, from user point of view this is a strange behaviour that's why I am giving my article's title "OLD WINE IN NEW BOTTLE"
Thanks Ajit
|