title: How can I data-bind a dynamically-created control?
body: <p>In the past, I've created data bindings like so:</p>
  
  <pre><code>textBoxPlatypusName.DataBindings.Add(new Binding("Text", PlatypusInfo, "PlatypusName"));
  </code></pre>
  
  <p>...but with dynamically-created controls, this is not possible (the compiler wouldn't be able to recognize "textBoxPlatypusName" at compile-time).</p>
  
  <p>Trying this:</p>
  
  <pre><code>TextBox tb = (TextBox)this.Controls.Find("textBoxPlatypusName", true).First();
  (TextBox)tb.DataBindings.Add(new Binding("Text", PlatypusInfo, "PlatypusName"));
  </code></pre>
  
  <p>...gives me, "<em>Cannot convert type 'void' to 'System.Windows.Forms.TextBox'</em>" and "<em>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</em>"</p>
  
  <p>Is there a way to accomplish this?</p>