Hello brother ! i think the problem is that instead of passing the
function name to the delegate object, u were passing the string Txt
argument thats y u were getting error. Please try following code, hope
this would help
if the problem still exists please dont hesitate to write
private delegate void appendToTextBoxDelegate(String Txt);
//or use delegate object
public appentToTextBox _appendToTextBox;
private void appendToTextBox(String Txt)
{
if (this.InvokeRequired)
{
//anonymous object approach
this.BeginInvoke(new
appendToTextBoxDelegate(appendToTextBox), new object[] { Txt })
//second named object approach
_appentToTextBox=new
appendToTextBoxDelegate(appentToTextBox);
this.Invoke(_appendToTextBox,new object[] {Txt});
}
textBox1.Text += Txt;
}