title: Make a Property Code Snippet in Visual Studio
body: <p>I got tired to write boiler plate properties code such as:</p>
  
  <pre><code>public string Name
  {
       get { return this.name; }
       set { SetProperty(ref name, value); }
  }
  </code></pre>
  
  <p>So I decided to make a code snippet in Visual Studio to automate the process:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;CodeSnippets
      xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"&gt;
    &lt;CodeSnippet Format="1.0.0"&gt;
      &lt;Header&gt;
        &lt;Title&gt;MVVM Property&lt;/Title&gt;
        &lt;Shortcut&gt;propm&lt;/Shortcut&gt;
        &lt;Author&gt;MFeinstein&lt;/Author&gt;
        &lt;Description&gt;Adds a Property that calls PRISM no Notify any changes&lt;/Description&gt;
      &lt;/Header&gt;
      &lt;Snippet&gt;
        &lt;Declarations&gt;
          &lt;Literal&gt;
            &lt;ID&gt;type&lt;/ID&gt;
            &lt;ToolTip&gt;Replace with the property type&lt;/ToolTip&gt;
            &lt;Default&gt;string&lt;/Default&gt;
          &lt;/Literal&gt;
          &lt;Literal&gt;
            &lt;ID&gt;PropertyName&lt;/ID&gt;
            &lt;ToolTip&gt;Replace with the property name&lt;/ToolTip&gt;
            &lt;Default&gt;propertyName&lt;/Default&gt;
          &lt;/Literal&gt;
          &lt;Literal&gt;
            &lt;ID&gt;fieldName&lt;/ID&gt;
            &lt;ToolTip&gt;Replace with the field name&lt;/ToolTip&gt;
            &lt;Default&gt;fieldName&lt;/Default&gt;
          &lt;/Literal&gt;
        &lt;/Declarations&gt;
        &lt;Code Language="csharp"&gt;
          &lt;![CDATA[private $type$ $fieldName$;
  
          public $type$ $PropertyName$
          {
              get { return this.$fieldName$; }
              set { SetProperty(ref $fieldName$, value); }
          }$selected$ $end$]]&gt;
        &lt;/Code&gt;
      &lt;/Snippet&gt;
    &lt;/CodeSnippet&gt;
  &lt;/CodeSnippets&gt;
  </code></pre>
  
  <p>the problem is, I wanted to just type the name once, and have it as "name" in the field and as "Name" in the property, with the uppercase. Also, I wanted to automatically group the backing fields in the beginning of the class, just as the good practices recommend. </p>
  
  <p>Does anyone knows how to do this?</p>