R# 6.1 EAP - Incorrect Enum.ToString warning

Given the code

enum Color {Red, Green, Blue}

var color = Color.Red;
var name = color.ToString();

R# suggests in this case the to replace the call color.ToString() with
color.ToString(CultureInfo.InvariantCulture).

But when I do that, I get the warning: color.ToString(IFormatProvider) is
obsolete.

Kind regards,
Henning

If you get your question answered, please come back and mark the reply as an
answer.
If you are helped by an answer to someone else's question, please mark it as
helpful.


1 comment
Comment actions Permalink

Hello Henning,

You're welcome to vote for this issue in our bug-tracker: http://youtrack.jetbrains.net/issue/RSRP-279359.
Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Given the code

enum Color {Red, Green, Blue}

var color = Color.Red;
var name = color.ToString();
R# suggests in this case the to replace the call color.ToString() with
color.ToString(CultureInfo.InvariantCulture).

But when I do that, I get the warning: color.ToString(IFormatProvider)
is obsolete.

Kind regards,
Henning
If you get your question answered, please come back and mark the reply
as an
answer.
If you are helped by an answer to someone else's question, please mark
it as
helpful.



0

Please sign in to leave a comment.