コード例 #1
0
    public static IntergerStructSequential NewIntergerStructSequential(int i1)
    {
        IntergerStructSequential u1 = new IntergerStructSequential();

        u1.i = i1;

        return(u1);
    }
コード例 #2
0
 public static bool ValidateIntergerStructSequential(IntergerStructSequential str1, IntergerStructSequential str2, string methodName)
 {
     if (str1.i != str2.i)
     {
         Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected.");
         Console.WriteLine("\tThe Actual is...");
         PrintIntergerStructSequential(str1, str1.ToString());
         Console.WriteLine("\tThe Expected is...");
         PrintIntergerStructSequential(str2, str2.ToString());
         return(false);
     }
     else
     {
         Console.WriteLine("\tPASSED!");
         return(true);
     }
 }
コード例 #3
0
 public static void PrintIntergerStructSequential(IntergerStructSequential str1, string name)
 {
     Console.WriteLine("\t{0}.i = {1}", name, str1.i);
 }