Why can’t I display Messageboxbuttons if it’s not a string?

Asked

Viewed 71 times

6

'Cause I’m having trouble showing off MessageBoxButtons if it is not a string?

static void Main()
{
    string texto = "Minha primeira MessageBox";
    MessageBoxButtons botao = MessageBoxButtons.OKCancel;
    DialogResult result;
    result = MessageBox.Show(texto, botao);
    if(result == DialogResult.OK)
    {
        MessageBox.Show("Isso ai");
    }
}

1 answer

5


  • Yes, I understand now. When checking the documentation, I didn’t see anything specifying that I needed two string parameters before a Messageboxbuttons. But you should also have been aware of the examples. Thank you very much

  • If you’ve solved your problem you can accept the answer, right next door.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.