????C#?е????????SystemException??????????ApplicationException????ó??????????????????????? ????????????????????ApplicationException??????????????.NETFramework???????????????SystemException??????
????????????????????????????????????
????????????????????д?????????????????????????????????????л???[Serializable]
?????????????????????????????????????????????
??????????????????message???????
?????????????????message???????????????????????
?????壺????????????????????????????
class MyException  : ApplicationException
{
private int a;
public MyException() {
a = 0;
}
public MyException(string message??int b)
: base(message) {
a = b;
}
public MyException(string message?? Exception inner??int b)
: base(message?? inner) {
a = b;
}
public  int  GetInt()
{
return a;
}
}
try {
int a = 1;
if (a == 1)
{
throw new MyException("YYC"??2);
// throw new MyException();
//?????“YYC”????????????EXception???????Message??
}
}
catch (MyException ex)
{
MessageBox.Show(ex.Message+ex.GetInt().ToString());
//????????????????????????????м?????????
}