假设我在对象中有以下方法:
public class foo
{
public bool DoSomethingAwesome()
{
bool bar = DidSomething() //suppose this sends an email;
return bar;
}
}
Run Code Online (Sandbox Code Playgroud)
如果我想提供更多有关为什么DidSomething返回false的详细信息,那么最佳做法是将消息分配给foo,或者将Out参数分配给DoSomethingAwesome?
| 归档时间: |
|
| 查看次数: |
183 次 |
| 最近记录: |