title: How to convert int or bool to checkState
body: <p>I need to convert int and or bool to checkState</p>
  
  <pre><code>int ValueCheck;      
  private void gsCheck1_CheckedChanged(object sender, EventArgs e)
  {
      CheckBox box = sender as CheckBox;
      box.CheckState = ValueCheck; // doesn't work
      this.gsCheck2.CheckState = ValueCheck; // should be 1 or 0 ?
  }
  </code></pre>
  
  <p>As you can see I want to change (this.gsCheck2) CheckState by changeing (this.gsCheck1) CheckState and end up with a integer value which is need.</p>
  
  <p>Update....
  problem solved</p>
  
  <pre><code>private int ValueCheck(CheckState Check)
  {
      if (Check == CheckState.Checked)
          return 1; 
      else
          return 0; 
  }
  
  
  private void gs_CheckedChanged(object sender, EventArgs e)
  {
      CheckBox box = sender as CheckBox;
      MessageBox.Show(box.Name + "="+ ValueCheck(box.CheckState).ToString());
  }
  </code></pre>