我正在运行以下内容:-
private void ConvertFile()
{
PrepElec1();
MakeElec2();
MakeElec3();
MakeElec4();
MakeElecMerged();
SetDataSet.SetData(DtSet);
btnConvert.Enabled = false;
btnReport.Visible = true;
}
我怎样才能实现 try/catch,以便如果其中一个失败......
PrepElec1();
MakeElec2();
MakeElec3();
MakeElec4();
MakeElecMerged();
...我收到一个消息框,显示它在哪一步失败?