public void testScope() { InAssembly1Class cls = new InAssembly1Class(); cls.greetings(); // cls.greetingsProtected(); // Cannot access cls.greetingsInternal(); }
public void greetings() { DebugMgr.start(10, "InAssembly2Class.greetings"); InAssembly1Class cls = new InAssembly1Class(); cls.greetings(); // cls.greetingsProtected(); // This method cannot be access due to protected measures // cls.greetingsInternal(); // This method cannot be accessed outside the assembly // InAssembly1Class2 cls2 = new InAssembly1Class2(); // Cannot be accessed DebugMgr.end(10); }
static void testAssembliesScope() { InAssembly1Class assm1 = new InAssembly1Class(); assm1.greetings(); InAssembly2Class assm2 = new InAssembly2Class(); assm2.greetings(); TestExternalReference.RunIt(); //TestInheritance.TestClass.RunIt(); }
public static void RunIt() { DebugMgr.start(10, "TestExternalreference.RunIt"); InAssembly2Class2 cls = new InAssembly2Class2(); cls.greetings(); //cls.greetingsProtected(); cls.greetingsInternal(); cls.greetingsInternalVirtual(); DebugMgr.output(10, "-----------"); InAssembly1Class cls2 = cls; cls2.greetings(); //cls2.greetingsInternal(); cls2.CallTheInternalMethod(); DebugMgr.end(10); }