110,538
社区成员
发帖
与我相关
我的任务
分享
using System;
using System.Windows.Forms;
class Form1 : Form
{
Form1()
{
int i = 0;
int j = 3 / i;
}
[STAThread]
static void Main()
{
try
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
catch (Exception e) // 在这个程序中会触发
{
MessageBox.Show(e.Message); // 显示“试图除以零”
}
}
}