title: How can I get all Labels on a form and set the Text property of those with a particular name pattern to string.empty?
body: <p>I want to clear all values on a form where the control is a label and its name starts with "label"</p>
  
  <p>This code:</p>
  
  <pre><code>List&lt;Label&gt; lbls = this.Controls.OfType&lt;Label&gt;().ToList();
  foreach (var lbl in lbls)
  {
      if (lbl.Name.StartsWith("label"))
      {
          lbl.Text = string.Empty;
      }
  }
  </code></pre>
  
  <p>...doesn't work, because the lambda is finding nothing - lbls.Count = 0.</p>
  
  <p>Wouldn't this get ALL the controls on the form, even those that are children of other controls (such as, in my case, Panels)?</p>