Skip to content

Commit

Permalink
Update MA0076.md (#772)
Browse files Browse the repository at this point in the history
suggested compliant solution will generate another warning, provide a no-warning example.
  • Loading branch information
Thieum authored Nov 21, 2024
1 parent ac26787 commit f255a66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/Rules/MA0076.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
````csharp
_ = $"abc{-1}"; // non-compliant as the result depends on the current culture
_ = FormattableString.Invariant($"abc{-1}"); // compliant
_ = FormattableString.Invariant($"abc{-1}"); // compliant but will generate MA0111
_ = string.Create(CultureInfo.InvariantCulture, $"abc{-1}"); // compliant
FormattableString str = $"abc{-1}"; // compliant
````

Expand Down

0 comments on commit f255a66

Please sign in to comment.