title: Why am I getting "'System.Windows.Forms.Control' does not contain a definition for 'Checked' ..." here?
body: <p>I've found a lot of questions in this topic, but not this one: I'm using c# applications settings, but it's becoming very ugly to save each settings in a new row. I tried to save this with the following code:</p>
  
  <pre><code>for (int j = 0; j &lt; settingsTabControl.SelectedTab.Controls.Count; j++)
  {
      string currItemName = settingsTabControl.SelectedTab.Controls[j].Name;
      if (currItemName.Substring(0, 7) == "savable" &amp;&amp; currItemName == currOptionName)
      {
          if (savableRunAsAdmin.HasProperty("Text"))
          {
              settingsTabControl.SelectedTab.Controls[j].Text = currOptionValue;
          }
          else if (savableRunAsAdmin.HasProperty("Checked"))
          {
              settingsTabControl.SelectedTab.Controls[j].Checked = Convert.ToBoolean(currOptionValue);
          }
      }
  }
  
  public static bool HasProperty(this object objectToCheck, string methodName)
  {
      var type = objectToCheck.GetType();
      return type.GetProperty(methodName) != null;
  }
  </code></pre>
  
  <p>But it says, that</p>
  
  <pre><code>'System.Windows.Forms.Control' does not contain a definition for 'Checked' and no extension method 'Checked' accepting a first argument of type 'System.Windows.Forms.Control' could be found (are you missing a using directive or an assembly reference?)
  </code></pre>
  
  <p>Can I dynamically save settings, or do I have to save each setting one by one?</p>