Format string and arguments do not match (CA2241)
Esta página aún no está disponible en tu idioma.
Key dotnet.codequality.format-arguments · Severity error · Category codequality
Microsoft analyzer CA2241. Flags string.Format and similar calls whose placeholders and arguments do not line up. A missing argument throws FormatException at run time.
Incorrect
Section titled “Incorrect”var text = string.Format("{0} of {1} items", done);Correct
Section titled “Correct”var text = string.Format("{0} of {1} items", done, total);