Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-289122: Specify a culture in string conversion explicitly is obsolete for System.Enum

$
0
0
Reporter Andrea Sciamanna (sciamannikoo) Andrea Sciamanna (sciamannikoo)
Created Mar 6, 2012 1:55:24 PM
Updated Mar 13, 2012 11:42:53 PM
Priority Normal
Type Bug
Fix versions No Fix versions
State Submitted
Assignee Unassigned
Subsystem Code Analysis
Affected versions 6.1.1
Fixed in build No Fixed in build
I have this code:

var fi = type.GetField(value.ToString());



R# suggests me to specify a culture in string conversion explicitly, so to please it, I change the line to
var fi = type.GetField(value.ToString(CultureInfo.InvariantCulture));


But then I get this warning:
Method 'System.Enum.ToString' is obsolete: "The provider argument is not used. Please use ToString(String)."

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>