コード例 #1
0
 public MFTestResults Static_Inst21_Test()
 {
     Log.Comment(" Section 10.2 ");
     Log.Comment(" An instance function member (method, property ");
     Log.Comment(" accessor, indexer accessor, constructor, or ");
     Log.Comment(" destructor) operates on a given instance of ");
     Log.Comment(" the class, and this instance can be accessed as");
     Log.Comment(" this.");
     if (Static_InstTestClass21.testMethod())
     {
         return(MFTestResults.Pass);
     }
     return(MFTestResults.Fail);
 }
コード例 #2
0
 public static bool testMethod()
 {
     Static_InstTestClass21 test = new Static_InstTestClass21();
     int intK = test[1];
     if (test.intI == 2)
     {
         return true;
     }
     else
     {
         return false;
     }
 }