【发布时间】:2011-02-11 00:22:19
【问题描述】:
在 catch 块中有 return 语句是错误的吗?
有哪些选择?
即:
public bool SomeFunction()
{
try
{
//somecode
return true;
}
catch(Exception ex)
{
MessageBox.Show(ex.message);
return false;
}
}
【问题讨论】:
标签: c# .net exception-handling