History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-45318
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Alexander Zverev
Reporter: Andrew Serebryansky
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ReSharper

'Can be constant' suggestion

Created: 11 Jul 07 16:35   Updated: 17 Mar 08 12:52
Component/s: Context actions
Fix Version/s: 4.0
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
Please consider improving your "readonly" suggestion to also suggest "const" when appropriate:

public class Test
{
private const string const1 = "Const1";
private string const2 = "Const2"; // BAD - flagged as "can be read-only", but "can be const" would be better



 All   Comments   Work Log   Change History      Sort Order:
Ilya Ryzhenkov - 11 Jul 07 20:01
I believe suggestion should read "Field can be made readonly or const" in case it really can be const. Also, there should be two quickfixes - to make it readonly and const.