You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ToString(String, IFormatProvider) This method overload is obsolete; use ToString(String).
ToString(IFormatProvider) This method overload is obsolete; use ToString().
Warning S4056 Use the overload that takes a 'CultureInfo' or 'IFormatProvider' parameter.
Known workarounds
Related information
SonarAnalyzer.CSharp 6.3.0.2862
Visual Studio Professional 2017, version 15.3.1
The text was updated successfully, but these errors were encountered:
Evangelink
changed the title
S4056 false positive for Enum.ToString()
Fix S4056: Rule should not recommend to use ToString(IFormatProvide)
Aug 21, 2017
Evangelink
changed the title
Fix S4056: Rule should not recommend to use ToString(IFormatProvide)
Fix S4056: Rule should not recommend to use Enum.ToString(IFormatProvide)
Aug 21, 2017
Evangelink
changed the title
Fix S4056: Rule should not recommend to use Enum.ToString(IFormatProvide)
Fix S4056: Rule should not recommend to use Enum.ToString(IFormatProvider)
Aug 21, 2017
michalb-sonar
changed the title
Fix S4056: Rule should not recommend to use Enum.ToString(IFormatProvider)
Fix S4056: Rule should not recommend to use obsolete methods
Sep 12, 2017
Description
The usage of Enum.ToString() method is detected by S4056 rule, but the overloads which are using IFormatProvider are depreciated, as described in https://docs.microsoft.com/en-us/dotnet/api/system.enum.tostring?view=netframework-4.7
Repro steps
Expected behavior
No issues for S4056 is detected
Actual behavior
Both lines are generating
Known workarounds
Related information
The text was updated successfully, but these errors were encountered: