Only assignment, call, increment, decrement, and new object expressions can be used as a statement : Messagebox
- by Nuru Salihu
This what i am trying to achieved
if(this.BeginInvoke((Action)(() => MessageBox.Show("Test", MessageBoxButtons.YesNo) == DialogResult.No)))
The above gives error. I try seperating the delegate to an outside method like
delegate void test(string text);
private void SetTest(string text)
{
if(MessageBox.Show(text,"", MessageBoxButtons.YesNo) == DialogResult.No)
}
But it breach the very reason why i need the delegate. I found out the first works for me but i don't know how to put it in an if/else statement. Pls any help in a better way i can achieve some thing like below would be appreciated.
if(this.BeginInvoke((Action)(() => MessageBox.Show("Test", MessageBoxButtons.YesNo) == DialogResult.No)))