Inexisting argument in format string
I have a number of places in my code where ReSharper is marking an error Inexisting argument in format string. Other than the poor English (perhaps, Non-existent argument in format string), can anyone tell me why this is showing up?
Version is 2.0.206.146
See attached image.
Thanks
Todd Breiholz
Meredith Corporation
Attachment(s):
Inexistingargument.png
Please sign in to leave a comment.
I believe that it is 'new object [] { ... }' expression that causes a trouble for ReSharper. If you modify code in the following way:
was:
string.Format (" ", new object [] { foo, bar }) now: string.Format (" ", foo, bar);
ReSharper should not complain. There's no necessity to pass an array explicity, as string.Format expects variable number of arguments.
But, of course, this is a bug, and we should fix it. Thank you for reporting!