Difference between Properties and variables in C#
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
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
Madhu KRank #1,514 · 1.1K reputationPosted Nov 21, 2010, 7:28 PM EST
http://www.c-sharpcorner.com/UploadFile/puranindia/Variables11122009020831AM/Variables.aspx
http://www.c-sharpcorner.com/UploadFile/rajeshvs/PropertiesInCS11122005001040AM/PropertiesInCS.aspx
ShankeyRank #972 · 2.1K reputationPosted Nov 21, 2010, 7:57 PM EST
The main difference between properties and variable is that the properties are encapsulated within the class,it is the data memeber of the class and a copy of for each object of that class and variable are local to their scope, Properties have scope within the class