var confirmResult = MessageBox.Show("Are you sure to delete this item ??",
"Confirm Delete!!",
MessageBoxButtons.YesNo);
if (confirmResult == DialogResult.Yes)
{
// If 'Yes', do something here.
}
else
{
// If 'No', do something here.
}
MessageBoxResult confirmResult = MessageBox.Show("Are you sure to delete this item ??", "Confirm Delete!!", MessageBoxButton.YesNo);`
if (confirmResult == MessageBoxResult.Yes)
{
// If 'Yes', do something here.
}
else
{
// If 'No', do something here.
}