C# MessageBox 确定|取消
简介:
DialogResult dr = MessageBox.Show("确认删除吗", "提示", MessageBoxButtons.OKCancel);
if (dr == DialogResult.
- DialogResult dr = MessageBox.Show("确认删除吗", "提示", MessageBoxButtons.OKCancel);
- if (dr == DialogResult.OK)
- {
- MessageBox.Show("您选择的是【确认】");
- }
- else if (dr == DialogResult.Cancel)
- {
- MessageBox.Show("您选择的是【取消】");
- }