title: Programatically Unchecking boxes based on selection
body: <p>I have two (or more words) that I want the checkbox states to be "checked" or "unchecked"</p>
  
  <p>When the array loops a second time, it undoes the selection from the first index in the array.</p>
  
  <pre><code>    String[] Others = { "Conference", "Calendar" };
      filterSelection(Others);
  
  
  
  
      private void filterSelection(String location)
      {
          for (int i = 0; i &lt; checkBoxArray.Length; i++)
          {
              checkBox = checkBoxArray[i];
              if (checkBox.Text.Contains(location))
              {
                  checkBox.CheckState = CheckState.Checked;
              }
              else
              {
                  checkBox.CheckState = CheckState.Unchecked;
              }
              checkBoxArray[i] = checkBox;
          }
      }
  
      private void filterSelection(String[] location)
      {
          for(int i=0; i&lt;location.Length; i++)
          {
              filterSelection(location[i]);
          }
      }
  </code></pre>
  
  <p>Is there anyway I can turn on and off the checkboxes based on the words in an array? (if you have a better idea, please provide a reason).</p>