I’ve just picked up Resharper and have been playing around converting fields to properties. I want these properties to be protected, but Resharper doesn’t want to give me that option. Instead there is only a Protected Internal option. This has me thinking. Either there is a rule somewhere that properties should always be ‘protected internal’ rather than just ‘protected’. Or I just don’t know how to use resharper. Which is it?
Update: Contacted Jetbrains themselves and they have identified this behaviour as a bug and raised a bug report. Marc’s answer is essentially correct on the usage of ‘protected internal’ so he gets the big tick.
What are the fields at the moment?
public? I wonder if you have some code in other types that is already touching the properties, and thus would break if they were justprotected. I don’t know how resharper feels about it, but it is not necessary (or even particularly common) to make thingsprotected internal– soprotectedshould be a reasonable option.