Reporter | David Gardiner (flcdrg) |
---|---|
Created | Feb 3, 2016 4:28:58 AM |
Updated | Apr 11, 2018 5:27:01 PM |
Subsystem | Quick Fixes |
Assignee | Alexander Shvedov (shvedov) |
Priority | Critical |
State | In Progress |
Type | Bug |
Fix version | 2018.2 |
Affected versions | 10.0.2 |
Fixed In Version ReSharper | Undefined |
VsVersion | VS 2015 RTM |
Given a class with more than one field that is a candidate to be made readonly, the UI offers the option to convert fields in the current file, project or solution - but none of these options have any effect and no error is reported.
The following class demonstrates this:
None of these options work.
This occurs for both static and non-static fields.
The following class demonstrates this:
// ReSharper disable UnusedMember.Global
// ReSharper disable MemberCanBePrivate.Global
namespace ResharperReadonlyInFile
{
public class MyClass
{
public string Field1 = "Blah";
public string Field2 = "Blah2";
public string Thing()
{
return $"{Field1}{Field2}";
}
}
}
None of these options work.
This occurs for both static and non-static fields.