// visible inside the defining assembly onlyinternal class Foo;// visible outside the defining assemblypublic class Bar{ // visible outside the defining assembly // but foo is only available internally // so error public Foo GetFoo() { return new Foo(); } // visible internally only // so no error internal Foo GetFoo() { return new Foo(); }}
Bar
internal
Foo
public
internal class Foo;public class Bar : Foo;