Example #1
0
	public int Test_Nested(ClsA Nested_Cls){
		int mi_RetCode = 100;
		
		/////////////////////////////////////////////////////////////////////////
		/////////////////////////////////////////////////////////////////////////
		// ACCESS NESTED FIELDS/MEMBERS
		/////////////////////////////////////////////////////////////////////////
		/////////////////////////////////////////////////////////////////////////
		
		/////////////////////////////////
		// Test instance field access
		Nested_Cls.NestFldAPubInst = 100;
		if(Nested_Cls.NestFldAPubInst != 100)
			mi_RetCode = 0;
		
		Nested_Cls.NestFldAAsmInst = 100;
		if(Nested_Cls.NestFldAAsmInst != 100)
			mi_RetCode = 0;
		
		Nested_Cls.NestFldAFoaInst = 100;
		if(Nested_Cls.NestFldAFoaInst != 100)
			mi_RetCode = 0;
		
		/////////////////////////////////
		// Test static field access
		A.ClsA.NestFldAPubStat = 100;
		if(A.ClsA.NestFldAPubStat != 100)
			mi_RetCode = 0;
		
		A.ClsA.NestFldAAsmStat = 100;
		if(A.ClsA.NestFldAAsmStat != 100)
			mi_RetCode = 0;
		
		A.ClsA.NestFldAFoaStat = 100;
		if(A.ClsA.NestFldAFoaStat != 100)
			mi_RetCode = 0;
		
		/////////////////////////////////
		// Test instance MethAod access  
		if(Nested_Cls.NestMethAPubInst() != 100)
			mi_RetCode = 0;
		
		if(Nested_Cls.NestMethAAsmInst() != 100)
			mi_RetCode = 0;
		
		if(Nested_Cls.NestMethAFoaInst() != 100)
			mi_RetCode = 0;
		
		/////////////////////////////////
		// Test static MethAod access
		if(A.ClsA.NestMethAPubStat() != 100)
			mi_RetCode = 0;
		
		if(A.ClsA.NestMethAAsmStat() != 100)
			mi_RetCode = 0;
		
		if(A.ClsA.NestMethAFoaStat() != 100)
			mi_RetCode = 0;  
		
		/////////////////////////////////
		// Test virtual MethAod access
		if(Nested_Cls.NestMethAPubVirt() != 100)
			mi_RetCode = 0;
		
		if(Nested_Cls.NestMethAAsmVirt() != 100)
			mi_RetCode = 0;
		
		if(Nested_Cls.NestMethAFoaVirt() != 100)
			mi_RetCode = 0;  
		
		////////////////////////////////////////////
		// Test access from within the nested class
		if(Nested_Cls.Test() != 100)
			mi_RetCode = 0;

		return mi_RetCode;
	}
Example #2
0
	public int Test_Nested(ClsA Nested_Cls){
		int mi_RetCode = 100;
		
		/////////////////////////////////////////////////////////////////////////
		/////////////////////////////////////////////////////////////////////////
		// ACCESS NESTED FIELDS/MEMBERS
		/////////////////////////////////////////////////////////////////////////
		/////////////////////////////////////////////////////////////////////////
		
		/////////////////////////////////
		// Test instance field access
		Nested_Cls.NestFldAPubInst = 100;
		if(Nested_Cls.NestFldAPubInst != 100)
			mi_RetCode = 0;
		
		/////////////////////////////////
		// Test static field access
		A.ClsA.NestFldAPubStat = 100;
		if(A.ClsA.NestFldAPubStat != 100)
			mi_RetCode = 0;
		
		/////////////////////////////////
		// Test instance MethAod access  
		if(Nested_Cls.NestMethAPubInst() != 100)
			mi_RetCode = 0;
				
		/////////////////////////////////
		// Test static MethAod access
		if(A.ClsA.NestMethAPubStat() != 100)
			mi_RetCode = 0;
				
		/////////////////////////////////
		// Test virtual MethAod access
		if(Nested_Cls.NestMethAPubVirt() != 100)
			mi_RetCode = 0;

//@csharp - @todo - @bugbug - This is coded poorly in L-1-7-3 and L-1-8-3, we should be able to access assembly and famorassem members, but because of they way it's coded that's illegal according to C#, fix this up
		
		////////////////////////////////////////////
		// Test access from within the nested class
		if(Nested_Cls.Test() != 100)
			mi_RetCode = 0;

		return mi_RetCode;
	}