Reputation: 10542
The code below works just fine but I am looking for a way to combine all 3 into just one invoke statement:
this.Invoke(new MethodInvoker(delegate () {
String.Format(
"------------------------------------------------------------")
);
}));
this.Invoke(new MethodInvoker(delegate () {
String.Format(
"- END " + archiveFullName + " -"
);
}));
this.Invoke(new MethodInvoker(delegate () {
String.Format(
"------------------------------------------------------------")
);
}));
I've already tried:
this.Invoke(new MethodInvoker(delegate () {
listBox1.Items.Add(
this.listBox1.Items.Add("--------------------------------------------------------")
this.listBox1.Items.Add("- END " + archiveFullName + " -")
this.listBox1.Items.Add("-------------------------------------------------------")
);
}));
But that does not seem to work.
Any resolution would be great!
Upvotes: 0
Views: 719