Resharper dislikes protected internal methods?

Hi,

Somewhere in our frameworks we use protected internal methods in public
types, and Resharper always "complains" and suggest migration to protected.
Obviously, for public types protected internal is more restrictive than
protected, and very usefull in some scenarios.

I agree that Resharper should never suggest moving protected methods to
protected internal, but I believe insisting on the reverse is incorrect.

2 comments
Comment actions Permalink


http://msdn.microsoft.com/en-us/library/ms173121.aspx

protected internal
The type or member can be accessed by any code in the same assembly, or by
any derived class in another assembly.

So, protected is actually more restrictive, than protected internal.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


MA> Hi,
MA>
MA> Somewhere in our frameworks we use protected internal methods in
MA> public types, and Resharper always "complains" and suggest migration
MA> to protected. Obviously, for public types protected internal is more
MA> restrictive than protected, and very usefull in some scenarios.
MA>
MA> I agree that Resharper should never suggest moving protected methods
MA> to protected internal, but I believe insisting on the reverse is
MA> incorrect.
MA>


0
Comment actions Permalink

Looks like I've been living in assumption land, and that I will need to
convert my code to internal only.

Sorry about the noise :)

morty

"Ilya Ryzhenkov" <orangy@jetbrains.com> wrote in message
news:151d24b61ab6a28cca61c351ba508@news.intellij.net...
>

http://msdn.microsoft.com/en-us/library/ms173121.aspx

>

protected internal
The type or member can be accessed by any code in the same assembly, or by
any derived class in another assembly.

>

So, protected is actually more restrictive, than protected internal.
Sincerely,
Ilya Ryzhenkov

>

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>

MA> Hi,
MA> MA> Somewhere in our frameworks we use protected internal methods in
MA> public types, and Resharper always "complains" and suggest migration
MA> to protected. Obviously, for public types protected internal is more
MA> restrictive than protected, and very usefull in some scenarios.
MA> MA> I agree that Resharper should never suggest moving protected
methods
MA> to protected internal, but I believe insisting on the reverse is
MA> incorrect.
MA>

0

Please sign in to leave a comment.