public void Fields41_testMethod()
 {
     OutputHelper.WriteLine(" Section 10.4");
     OutputHelper.WriteLine(" A static readonly field is useful when a symbolic");
     OutputHelper.WriteLine(" name for a constant value is desired, but when the ");
     OutputHelper.WriteLine(" type of the value is not permitted in a const declaration");
     OutputHelper.WriteLine(" or when the value cannot be computed at compile-time");
     OutputHelper.WriteLine(" by a constant expression.");
     Assert.True(FieldsTestClass41.testMethod());
 }
示例#2
0
 public MFTestResults Fields41_testMethod()
 {
     Log.Comment(" Section 10.4");
     Log.Comment(" A static readonly field is useful when a symbolic");
     Log.Comment(" name for a constant value is desired, but when the ");
     Log.Comment(" type of the value is not permitted in a const declaration");
     Log.Comment(" or when the value cannot be computed at compile-time");
     Log.Comment(" by a constant expression.");
     if (FieldsTestClass41.testMethod())
     {
         return(MFTestResults.Pass);
     }
     return(MFTestResults.Fail);
 }