title: Add code to C# get/set of property without needing backing field?
body: <p>You know how you can have a property that automatically generates a backing field?  Like if I go: </p>
  
  <pre><code>public String SomeProperty {get; set;}
  </code></pre>
  
  <p>I know that if I want to add code to that property I have to create the backing field as so:</p>
  
  <pre><code> public string someProperty = string.Empty;
   public string SomeProperty
   {
       get { return someProperty; }
       set
       {
           someProperty = value;
           DoSomething();
       }
   }
  </code></pre>
  
  <p>Basically, what I want to know is... is there any way to do this but without having to create the backing field?  For example I could use it to trigger some kind of event that occurs when a property is set.  I'm looking for something like this:</p>
  
  <pre><code> public string SomeProperty
   {
       get;
       set { this.OnSomeEvent; }
   }
  </code></pre>
  
  <p>But I know that'll cause a compile error because <code>get</code> needs do declare a body if <code>set</code> does.</p>
  
  <p>I've researched and I cant find anything, but I thought I'd check to see if anyone knew.</p>
  
  <p>I guess what I'm really after is some way to trigger an event when a property is changed but without having to add all that extra clutter.  Any suggestions?</p>