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

RSRP-453533: Make all fields readonly in file/project/solution does not work

$
0
0
Reporter David Gardiner (flcdrg) 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:
// 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.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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