public void Static_Inst23_Test() { OutputHelper.WriteLine(" Section 10.2 "); OutputHelper.WriteLine(" An instance function member (method, property "); OutputHelper.WriteLine(" accessor, indexer accessor, constructor, or "); OutputHelper.WriteLine(" destructor) operates on a given instance of "); OutputHelper.WriteLine(" the class, and this instance can be accessed as"); OutputHelper.WriteLine(" this."); Assert.True(Static_InstTestClass23.testMethod()); }
public static bool testMethod() { Static_InstTestClass23 test = new Static_InstTestClass23(); test.foo(); if (test.intI == 2) { return(true); } else { return(false); } }
public MFTestResults Static_Inst23_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_InstTestClass23.testMethod()) { return(MFTestResults.Pass); } return(MFTestResults.Fail); }
public static bool testMethod() { Static_InstTestClass23 test = new Static_InstTestClass23(); test.foo(); if (test.intI == 2) { return true; } else { return false; } }