[438] Wrong Removing of .ToString()

Hi,

private static string GetWhereForVisibility(string where,
EntryVisibleOption visibility)
{
StringBuilder sb = new StringBuilder();

return string.Format(sb.ToString(), where);
}

R# suggest to Remove redundant .ToString(), but if i do it, then the code is
cannot compile anymore, also R# shows an error because of no valid overload.

--
Regards

Albert Weinert
MVP Visual Developer ASP.NET

http://der-albert.com

2 comments
Comment actions Permalink

I've seen this in 376.

Hi,

private static string GetWhereForVisibility(string where,
EntryVisibleOption visibility)
{
StringBuilder sb = new StringBuilder();

return string.Format(sb.ToString(), where);
}
R# suggest to Remove redundant .ToString(), but if i do it, then the
code is cannot compile anymore, also R# shows an error because of no
valid overload.

Albert Weinert
MVP Visual Developer ASP.NET
http://der-albert.com



0
Comment actions Permalink

Hello,

We appreciate your feedback.

The corresponding JIRA request has been created, and you are welcome to monitor
its status at http://www.jetbrains.net/jira/browse/RSRP-40949.

Best regards,
- Development Team.


0

Please sign in to leave a comment.