I am using Visual Studio 2013 with ReSharper 8.2.3.
In the code editor, VS will display some information about identifiers under the cursor in a popup box. This information is taken from the Xml API documentation included in the source assembly of the identifier.
Unfortunately, the documentation on exceptions seems to be missing there. Hence, calling the single method of the following class:
public static class ExampleClass
{
/// <summary>
/// Does something.
/// </summary>
/// <param name="text">The text to process.</param>
/// <returns>The result.</returns>
/// <exception cref="ArgumentNullException"><paramref name="text"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentException"><paramref name="text"/> is longer than 50 characters.</exception>
public static Int32 DoSomething(String text)
{
if (text == null)
{
throw new ArgumentNullException("text");
}
if (text.Length > 50)
{
throw new ArgumentException("The text is too long.");
}
return 42;
}
}
will result in the following popup:
Obviously, it is not very helpful for me to know that sometimes, the method might throw an ArgumentException
. I thus still have to go find the sources of said class to check out the Xml documentation.
Can some setting in ReSharper or Visual Studio itself be changed so these tooltips display the entire exception information?
Upgrading tool versions is currently not an option for us, unfortunately.
This question is not a duplicate of How to add documentation tooltip to classes, methods, properties, etc. in C#?. In fact, I'd say it's only marginally related. Yes, it also refers to C# and to Xml code documentation. The linked question, however, asks how to mark comments so the C# compiler and IDEs process them as Xml API documentation. This question, in contrast, asks how Visual Studio can be configured to display certain information in its code editor tooltips that is provided in the Xml API documentation, but is missing in these tooltips.
throws
-
-