C#关闭窗口代码

if (MessageBox.Show("请您确认是否退出(Y/N)", "系统提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
            {
                try
                {
                    this.Dispose();
                    this.Close();
                }
                catch (System.Exception error)
                {//WinIO卸载失败异常
                    MessageBox.Show(error.Message, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
            else
            {
                return;
            }

上一篇:【干货】Windows系统信息收集篇


下一篇:Hibernate--对象关系