TypeName | ArgumentExceptionAnalyzer |
Check Id | CC0002 |
Category | Usage |
Severity | Warning |
The string passed as the ‘paramName’ argument of ArgumentException constructor must be the name of one of the method arguments.
It can be either specified directly or using the nameof() operator (C#6 only)
public async Task Foo(int a, int b)
{
throw new ArgumentException("message", "c");
}
A code fix will be presented to you that will transform the code. You can choose from any of the arguments available:
public async Task Foo(int a, int b)
{
throw new ArgumentException("message", "a");
}
None
TBD