Click here to Skip to main content
14,242,360 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi,

what is exactly happening in auto-implemented properties over properties?

According to my knowledge automated properties create backup fields to properties, if so how its happening?

Thanks
Posted
Rate this:
Please Sign up or sign in to vote.

Solution 1

The compiler does it.
   
Comments
   
5ed. I recently answered in detail, but my answer was removed, as many others, due to abuse reports on the question.
I think this answer is just enough. :-)
—SA
usha sri latha 25-Sep-13 1:04am
   
yes compiler does it, means creation of backup fields for automated properties,in the case of properties not.

Is there any other difference

PIEBALDconsult 25-Sep-13 1:16am
   
In the immortal words of Bill Murray, "IT JUST DOESN"T MATTER".
   
There are no differences. You can write strictly equivalent types with auto-implemented and explicitly implemented property with trivial (no side effect) getter, setter, or both.
—SA
Rate this:
Please Sign up or sign in to vote.

Solution 3

properity defines collection of set and get methods with body.....
but auto implemented properity defines set and get methods without body ...that's all
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100