请问下边这几种情况能否编译?分别解释一下为何?求高手顺便总结一下!
情况一:
class Demo1
{
public void method()
{
try
{
throw new Exception();
}
catch (Exception e)
{
}
}
}
情况二:
class Demo2
{
public void method()
{
throw new Exception();
}
}
情况三:
class Demo1
{
public void method()
{
try
{
throw new Exception();
}
catch (Exception e)
{
try
{
throw new Exception();
}
catch ()
{
}
}
}
}
|