How do I change an object in a form's properties using a function?
<p>Let's say you're trying to set a label's text. By doing it, you call a function SetText(labelname, "texthere"). What would the SetText 'header' be?</p>

<p>I'm trying:</p>

<pre><code>private void SetText(object foo, string bar) 
</code></pre>

<p>but that doesn't work</p>

<p>edit: I have this:</p>

<pre><code>private void SetText(Control thing, string text)
{
if (this.InvokeRequired)
{
SetTextCallback d = new SetTextCallback(SetText);
Invoke(d, new object[] { text });
}
else
{
thing.Text = text;
}
}
</code></pre>

<p>But it says something about invalid number of parameters. What do I need to change?</p>
