XML Comments - How to comment multiple reasons for an exception?

Viewed 1584

Here's an example:

public void DoSomething(String param1, String param2)
{
    if (param1 == null) throw new ArgumentNullException("param1");
    if (param2 == null) throw new ArgumentNullException("param2");
}

2 different reasons for an ArgumentNullException. MSDNs String.Format Example shows 2 different reasons for the FormatException. So, is it done this way:

/// <exception cref="ArgumentNullException">
///     <paramref name="param1"/> is null.
/// </exception>
/// <exception cref="ArgumentNullException">
///     <paramref name="param2"/> is null.
/// </exception>

or some other way?

/// <exception cref="ArgumentNullException">
///     Some other way to show the 2 reasons with an "-or-" between them.
/// </exception>
1 Answers
Related