<!DOCTYPE qhelp PUBLIC
  "-//Semmle//qhelp//EN"
  "qhelp.dtd">
<qhelp>
<overview>
<p>
Arguments which are passed to formatting methods (such as <code>String.Format()</code>)
but are not used, are either unnecessary or mean that the format string is incorrect. The result
is that the argument will be ignored, which may not be the intended behavior.
</p>
</overview>

<recommendation>
<p>
Change the format string to use the highlighted argument, or remove the unnecessary argument.
</p>
</recommendation>

<example>
<p>
Here are three examples where the format string does not use all the arguments.
</p>
<sample src="FormatUnusedArgumentBad.cs"/>
<ul>
  <li>On line 5, the second argument (<code>ex.HResult</code>) is not logged.</li>
  <li>On line 6, the first argument (<code>ex</code>) is not logged but the second 
    argument (<code>ex.HResult</code>) is logged twice.</li>
  <li>On line 4, a C-style format string is used, which is incorrect, and neither 
    argument will be logged.</li>
</ul>  
</example>

<references>
  <li>MSDN: <a href="https://msdn.microsoft.com/en-us/library/system.string.format.aspx">String.Format Method</a>.</li>
  <li>Microsoft: <a href="https://docs.microsoft.com/en-us/dotnet/standard/base-types/composite-formatting">Composite Formatting</a>.</li>
</references>
</qhelp>