I have observed the following:
Whatever Get and Set can achive in property, same can be done by using 2 methods.
If any validation need to be done, that can be done in property as well as methods.
What's the benefit of using property?
Loading
amit_gupta14Posted Aug 20, 2009, 11:06 PM
Please provide the scenarios where we can actually see the usage of property.
i.e. what property can do, methods cannot do.
amit_gupta14Posted Aug 20, 2009, 12:46 AM
Sorry but this is not the required answer.
Just because property is new way of accessing private fields, we use it or there are actually some benfits.
amit_gupta14Posted Aug 20, 2009, 12:31 AM
That's what I am looking for. What properites can do, that methods cannot do.
Can u please give the scenarios.