title: Defining properties of a class
body: <p>can somebody tell me the difference between</p>
  
  <pre><code>public class Vendor
  {
      public string VendorName { get; set; }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>public class Vendor
  {
      private string vendorName = string.Empty; 
  
      public string VendorName
      {
          get { return vendorName; }
          set { vendorName = value; }
      }
  }
  </code></pre>
  
  <p>Is there any benefit of using a private variable? Doing so is only wastage of time and lines? There are no manipulations done to the property within the class.</p>
  
  <p>Thanks</p>