“Kotak pesan ya-no” Kode Jawaban

Kotak pesan ya-no

DialogResult dialogResult = MessageBox.Show("Sure", "Some Title", MessageBoxButtons.YesNo);
if(dialogResult == DialogResult.Yes)
{
    //do something
}
else if (dialogResult == DialogResult.No)
{
    //do something else
}
Helpful Hedgehog

Kotak pesan ya-no


DialogResult dialogResult = MessageBox.Show("Sure", "Some Title", MessageBoxButtons.YesNo);
if(dialogResult == DialogResult.Yes)
{
    //do something
}
else if (dialogResult == DialogResult.No)
{
    //do something else
}

Foolish Flatworm

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya