title: How make two way binding numericUpDown to member class
body: <p>I need twoway binding configClass.RaMsize to numericUpDown.</p>
  
  <pre><code>BindField(this.upDownRamSize, "Value", configClass, "RaMsize");//all right
  
  this.upDownRamSize.Value = 1213;// configClass.RaMsize - not change - it's bad!
  </code></pre>
  
  <p>Method:</p>
  
  <pre><code>public static void BindField(Control control, string propertyName,
                 object dataSource, string dataMember)
          {
              Binding bd;
  
              for (int index = control.DataBindings.Count - 1; (index == 0); index--)
              {
                  bd = control.DataBindings[index];
                  if (bd.PropertyName == propertyName)
                      control.DataBindings.Remove(bd);
              }
              control.DataBindings.Add(propertyName, dataSource, dataMember);
          }
  </code></pre>