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

RSRP-272715: "Create Set Accessor" quick fix is inferior to "Add Another Accessor" quick fix and should be replaced

$
0
0
Reporter William Dean (willdean) William Dean (willdean)
Created Jun 17, 2011 10:56:09 PM
Updated Apr 13, 2018 5:48:10 PM
Resolved Apr 13, 2018 5:48:10 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Obsolete
Type Usability Problem
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

There are two quickfixes that can add a set accessor to a read-only property.

One you get to with 'alt-enter' on the property definition within the class. That's a good quick fix, which intelligently completes the 'set' clause, including some very clever stuff if you have to get to a secondary object (_field.Value). This is 'Add another accessor'

The other qf is when you assign something to a read-only property and then do 'alt-enter' on the red-squiggled property name. This is 'Create set accessor'. It's lame, and just creates a 'throw new NotImplementedException()' placeholder.

Given that R# has two ways of generating a set accessor, a clever one and a stupid one, it should always use the clever one.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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