What is the use of creating properties for a variable?
<blockquote>
  <p><strong>Possible Duplicates:</strong><br>
  <a href="http://stackoverflow.com/questions/1277572/should-i-use-public-properties-and-private-fields-or-public-fields-for-data">Should I use public properties and private fields or public fields for data?</a><br>
  <a href="http://stackoverflow.com/questions/1180860/c-public-fields-versus-automatic-properties">C#: Public Fields versus Automatic Properties</a>  </p>
</blockquote>



<p>I have the following code:</p>

<pre><code>namespace Test {
    class My1 {
        private int intMark; //private 
        public int intAge;

        public int Mark {
           get { return intMark; }
           set { intMark = value; }
         }
    }

    class mainClass {
        static void Main() {
            My1 obj = new My1();
            obj.Mark = 100;
            obj.intAge = 34;
            // what is the difference between these statements..
        }
    }
}
</code></pre>

<p>In the above example we can declare intMark as public variable then we can handle with the object. Instead of that why Properties?</p>
