I have a method which throws a generic exception and I would like to document it, however I cannot figure out how to write a valid xml doc.
/// <summary>
/// Throws any exception.
/// </summary>
/// <typeparam name="TException">Type of the exception to throw </typeparam>
/// <exception cref="TException"> Thrown when whatever.... </exception>
public static void Throw<TException>() where TException : Exception
{
throw (TException)Activator.CreateInstance(typeof(TException));
}
The above gives the below error:
XML comment has a csref attribute that refers to a type parameter.