if(MessageBox.Show("你确定执行?", "确认提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question).dialogresult==dialogresult.ok)手写的差不多了