why we have to use get and set properties in our application,
public int i=0; // we can put int as a public then why we use get and set properties, what is the main use of that
Properties are members that provide a flexible mechanism to read, write, or compute the values of private fields.
This enables data to be accessed easily while still providing the safety and flexibility of methods.
http://csharpindepth.com/articles/chapter8/propertiesmatter.aspx
http://www.itorian.com/2012/07/properties-in-c-howwhy-we-use-this.html
http://stackoverflow.com/questions/1523548/why-we-need-properties-in-c-sharp
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.