Hi friends
can anybody defined the term property in C#. what is the use of property in our project (asp.net)?
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Jan 2, 2012, 7:06 AM EST
Please refer the below link
http://www.csharp-station.com/Tutorials/Lesson10.aspx
http://dotnetguts.blogspot.com/2007/07/advantage-of-using-properties.html
Thanks
VulpesRank #55 · 29.2K reputationPosted Jan 2, 2012, 8:05 AM EST
Under the hood, the get and set accessors of a property are simply methods. Some object oriented languages such as C++ or Java don't support properties as such but can simulate them by defining accessor methods.
Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 4, 2012, 10:08 PM EST
Properties provide the opportunity to protect a field in a class by reading and writing to it through the property. In other languages, this is often accomplished by programs implementing specialized getter and setter methods. C# properties enable this type of protection while also letting you access the property just like it was a field.
Another benefit of properties over fields is that you can change their internal implementation over time. With a public field, the underlying data type must always be the same because calling code depends on the field being the same. However, with a property, you can change the implementation.
http://dotnetguts.blogspot.com/2007/07/advantage-of-using-properties.html
http://csharpindepth.com/articles/chapter8/propertiesmatter.aspx
hope this help.