Public and Internal members in an Internal class?

Posted by Noldorin on Stack Overflow See other posts from Stack Overflow or by Noldorin
Published on 2010-04-01T23:14:22Z Indexed on 2010/04/01 23:23 UTC
Read the original article Hit count: 474

Filed under:
|
|
|
|

Ok, so this may be a bit of a silly question, and there's certainly the obvious answer, but I was curious if I've missed any subtleties here.

Is there any difference in terms of visibility/usability between a public member declared in an internal class and an internal member declared in an internal class?

i.e. between

internal class Foo
{
    public void Bar()
    {
    }
}

and

internal class Foo
{
    internal void Bar()
    {
    }
}

If you declared the method as public and also virtual, and then overrode it in a derived class that is public, the reason for using this modifier is clear. However, is this the only situation... am I missing something else?

© Stack Overflow or respective owner

Related posts about c#

Related posts about access-modifiers