public static int Test_Nested(A.ClsA.ClsA2 ac) { int mi_RetCode = 100; ///////////////////////////////// // Test instance field access ac.NestFldA2PubInst = 100; if (ac.NestFldA2PubInst != 100) { mi_RetCode = 0; } ///////////////////////////////// // Test static field access A.ClsA.ClsA2.NestFldA2PubStat = 100; if (A.ClsA.ClsA2.NestFldA2PubStat != 100) { mi_RetCode = 0; } ///////////////////////////////// // Test instance MethA2od access if (ac.NestMethA2PubInst() != 100) { mi_RetCode = 0; } ///////////////////////////////// // Test static MethA2od access if (A.ClsA.ClsA2.NestMethA2PubStat() != 100) { mi_RetCode = 0; } ///////////////////////////////// // Test virtual MethA2od access if (ac.NestMethA2PubVirt() != 100) { mi_RetCode = 0; } //////////////////////////////////////////// // Test access from within the nested class if (ac.Test() != 100) { mi_RetCode = 0; } return(mi_RetCode); }
public static int Test(){ int mi_RetCode = 100; B.ClsB.ClsB2 bc = new B.ClsB.ClsB2(); A.ClsA.ClsA2 ac = new A.ClsA.ClsA2(); B b = new B(); if(Test_Nested(bc) != 100) mi_RetCode = 0; if(Test_Nested(ac) != 100) mi_RetCode = 0; //@csharp - C# simply won't compile non-related private/family/protected access if(Test_Nested(b.ClsAPubInst.ClsA2PubInst) != 100) mi_RetCode = 0; if(Test_Nested(B.ClsAPubStat.ClsA2PubInst) != 100) mi_RetCode = 0; //---------------------------------------------------- if(Test_Nested(b.ClsBPubInst.ClsB2PubInst) != 100) mi_RetCode = 0; if(Test_Nested(b.ClsBPubInst.ClsB2AsmInst) != 100) mi_RetCode = 0; if(Test_Nested(b.ClsBPubInst.ClsB2FoaInst) != 100) mi_RetCode = 0; if(Test_Nested(b.ClsBAsmInst.ClsB2PubInst) != 100) mi_RetCode = 0; if(Test_Nested(b.ClsBAsmInst.ClsB2AsmInst) != 100) mi_RetCode = 0; if(Test_Nested(b.ClsBAsmInst.ClsB2FoaInst) != 100) mi_RetCode = 0; if(Test_Nested(b.ClsBFoaInst.ClsB2PubInst) != 100) mi_RetCode = 0; if(Test_Nested(b.ClsBFoaInst.ClsB2AsmInst) != 100) mi_RetCode = 0; if(Test_Nested(b.ClsBFoaInst.ClsB2FoaInst) != 100) mi_RetCode = 0; if(Test_Nested(B.ClsBPubStat.ClsB2PubInst) != 100) mi_RetCode = 0; if(Test_Nested(B.ClsBPubStat.ClsB2AsmInst) != 100) mi_RetCode = 0; if(Test_Nested(B.ClsBPubStat.ClsB2FoaInst) != 100) mi_RetCode = 0; return mi_RetCode; }
public static int Test() { int mi_RetCode = 100; B.ClsB.ClsB2 bc = new B.ClsB.ClsB2(); A.ClsA.ClsA2 ac = new A.ClsA.ClsA2(); B b = new B(); if (Test_Nested(bc) != 100) { mi_RetCode = 0; } if (Test_Nested(ac) != 100) { mi_RetCode = 0; } //@csharp - C# simply won't compile non-related private/family/protected access if (Test_Nested(b.ClsAPubInst.ClsA2PubInst) != 100) { mi_RetCode = 0; } if (Test_Nested(B.ClsAPubStat.ClsA2PubInst) != 100) { mi_RetCode = 0; } //---------------------------------------------------- if (Test_Nested(b.ClsBPubInst.ClsB2PubInst) != 100) { mi_RetCode = 0; } if (Test_Nested(b.ClsBPubInst.ClsB2AsmInst) != 100) { mi_RetCode = 0; } if (Test_Nested(b.ClsBPubInst.ClsB2FoaInst) != 100) { mi_RetCode = 0; } if (Test_Nested(b.ClsBAsmInst.ClsB2PubInst) != 100) { mi_RetCode = 0; } if (Test_Nested(b.ClsBAsmInst.ClsB2AsmInst) != 100) { mi_RetCode = 0; } if (Test_Nested(b.ClsBAsmInst.ClsB2FoaInst) != 100) { mi_RetCode = 0; } if (Test_Nested(b.ClsBFoaInst.ClsB2PubInst) != 100) { mi_RetCode = 0; } if (Test_Nested(b.ClsBFoaInst.ClsB2AsmInst) != 100) { mi_RetCode = 0; } if (Test_Nested(b.ClsBFoaInst.ClsB2FoaInst) != 100) { mi_RetCode = 0; } if (Test_Nested(B.ClsBPubStat.ClsB2PubInst) != 100) { mi_RetCode = 0; } if (Test_Nested(B.ClsBPubStat.ClsB2AsmInst) != 100) { mi_RetCode = 0; } if (Test_Nested(B.ClsBPubStat.ClsB2FoaInst) != 100) { mi_RetCode = 0; } return(mi_RetCode); }