Visual Studio seems to complain when I pass a string into an exception parameter.
if (str1 == null || str2 == null) { throw new ArgumentNullException('lmkl'); }
Visual Studio says that it cannot resolve symbol 'lmkl'.
If I have a string variable (eg above throw new... string s = 'test';) and include this as the parameter for the exception, Visual Studio is more than happy with this.
What gives?
Thanks
The documentation for the overloaded constructor for
ArgumentNullExceptionthat takes a single string parameter states that this argument should be:At the moment, if your code throws an exception you won’t know which argument was null.
Recommend rewriting to