catch (Exception ee)
{
MessageBox.Show("错误:" + ee.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
第二种方法
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}