title: C# - Code Analysis 2227 Confusion
body: <p>I have a class property that looks as follows:</p>
  
  <pre><code>public List&lt;Recipe&gt; RecipeList
  {
      get { return this._recipeList; }
  
      set
      {
          this._recipeList = value;
          OnPropertyChanged("RecipeList");
      }
  }
  </code></pre>
  
  <p>In another method I have the following which references the property above.</p>
  
  <pre><code>private void RecipeSearch()
  {
              this.RecipeList = RecipeManagerService.SearchByUnit(SearchCriteria)
                                 .Where(recipe =&gt; recipe.IsApproved == true &amp;&amp; !recipe.IsHidden).ToList();
  }
  </code></pre>
  
  <p>Code Analysis is issuing a CA 2227 warning: Change RecipeList to be read-only by removing the setter. Could anyone tell me why?</p>