我必须changeCompany()在现有类中添加一个控件.
我想下面的代码是可以的,但我有一个疑问:"返回"命令是否意味着回归原始公司?还是要添加一个我不知道的声明,类似的声明revertToPreviousCompany()?
try
{
changeCompany(companyId)
{
// the method will produce a message and return false if an error
if (!this.doSomeChecks()) {
return;
}
// much more code below
Run Code Online (Sandbox Code Playgroud)