title: question on get; set;
body: <p>I would like to set a modified flag when ever I change one of the class properties as shown below </p>
  
  <pre><code>public bool Modified { get; set; }
  public bool Enabled { get; set { Modified = true; } }
  </code></pre>
  
  <p>problem is I have an error and the compiler is asking me to declare a body for the get;
  I would rather not have to declare a separate private variable, is there another way to do this.</p>
  
  <p>c#, ,net-2</p>
  
  <p>thanks</p>