2024年3月28日发(作者:)
class Program
{
static void ProcessString(string str)
{
if (str == null)
{ throw new ArgumentNullException();
}
}
static void Main()
{
ine("输出结果为:");
try
{
string str = null;
ProcessString(str);
}
catch (ArgumentNullException e)
{
ine("{0} First exception.", e);
}
catch (Exception e)
{
ine("{0} Second exception.", e);
}
}
}
}


发布评论