【发布时间】:2011-06-22 03:13:03
【问题描述】:
这是一个例子:
public void DoSomething(String param1, String param2)
{
if (param1 == null) throw new ArgumentNullException("param1");
if (param2 == null) throw new ArgumentNullException("param2");
}
ArgumentNullException 的 2 个不同原因。 MSDN String.Format Example 显示FormatException 的两个不同原因。那么,是不是这样做的:
/// <exception cref="ArgumentNullException">
/// <paramref name="param1"/> is null.
/// </exception>
/// <exception cref="ArgumentNullException">
/// <paramref name="param2"/> is null.
/// </exception>
还是其他方式?
/// <exception cref="ArgumentNullException">
/// Some other way to show the 2 reasons with an "-or-" between them.
/// </exception>
【问题讨论】: