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

See attached image.


Todd Breiholz
Meredith Corporation

1 comment
Comment actions Permalink

I believe that it is 'new object [] { ... }' expression that causes a trouble for ReSharper. If you modify code in the following way:


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!


Please sign in to leave a comment.