Explain how properties differ from fields. Why would you expose public data through properties instead of fields

 Posted by deccansoft on 9/16/2010 | Category: C# Interview questions | Views: 2094

Properties allow validation code to execute when values are accessed or changed.This allows you to impose some measure of control over when and how
values are read or changed. Fields cannot perform validation when being
read or set

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response