title: C# disable a checkbox based on run-time textbox user input value
body: <p>I have two textbox to let user input start date and end date. Then I have a checkbox that allow user to check to see some calculations. My question is, how can I disable the checkbox if the duration between start date and end date is shorter than a specific length. I mean, right after user input the start date and end date, he/she would see the checkbox is disabled because the time period length is not long enough. </p>
  
  <pre><code>if (productWealth.Count &lt; 3)
      checkBox7.Enabled = false;
  </code></pre>
  
  <p>This is what I have now, if <code>count &lt; 3</code>, then checkbox 7 is disabled. Seems like the application only run the count when run click the RUN button, but I want them to see immediate effect.</p>