What does "Inconsistent modifiers style" mean in Resharper?


Resharper is suggesting the following code change:


  • The classe Pagamento has public methods.
  • Why the suggestion internal and not public ?
  • asked by anonymous 06.12.2015 / 15:48

    1 answer


    Is your intent for the class to be public? Then there is a mistake there. It needs to be explicitly public.

    Should the class be internal? That is, should it be accessible only within its own assembly ? Okay, so that's right, but Resharper is set to force it to be explicit. The C # compiler takes the class's default accessibility as internal, and it works, but Resharper thinks you should make it explicit to prevent this accessibility from being adopted by accident. Just what seems to be happening in this case.

    Or turn this off in Resharper settings , or make it explicit that it is internal

    06.12.2015 / 15:59