示例#1
0
    //return the struct CharSetUnicodeSequential instance
    public static CharSetUnicodeSequential NewCharSetUnicodeSequential(string f1, char f2)
    {
        CharSetUnicodeSequential str1 = new CharSetUnicodeSequential();

        str1.f1 = f1;
        str1.f2 = f2;
        return(str1);
    }
示例#2
0
 //	Returns true if the two params have the same fields
 public static bool ValidateCharSetUnicodeSequential(CharSetUnicodeSequential str1, CharSetUnicodeSequential str2, string methodName)
 {
     if (str1.f1 != str2.f1 || str1.f2 != str2.f2)
     {
         Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected.");
         Console.WriteLine("\tThe Actual is...");
         PrintCharSetUnicodeSequential(str1, str1.ToString());
         Console.WriteLine("\tThe Expected is...");
         PrintCharSetUnicodeSequential(str2, str2.ToString());
         return(false);
     }
     else
     {
         Console.WriteLine("\tPASSED!");
         return(true);
     }
 }
示例#3
0
 //	Returns true if the two params have the same fields
 public static bool ValidateCharSetUnicodeSequential(CharSetUnicodeSequential str1, CharSetUnicodeSequential str2, string methodName)
 {
     if (str1.f1 != str2.f1 || str1.f2 != str2.f2)
     {
         Console.WriteLine("\tFAILED! " + methodName + "did not recieve result as expected.");
         Console.WriteLine("\tThe Actual is...");
         PrintCharSetUnicodeSequential(str1, str1.ToString());
         Console.WriteLine("\tThe Expected is...");
         PrintCharSetUnicodeSequential(str2, str2.ToString());
         return false;
     }
     else
     {
         Console.WriteLine("\tPASSED!");
         return true;
     }
 }
示例#4
0
 //print the struct CharSetUnicodeSequential element
 public static void PrintCharSetUnicodeSequential(CharSetUnicodeSequential str1, string name)
 {
     Console.WriteLine("\t{0}.f1 = {1}", name, str1.f1);
     Console.WriteLine("\t{0}.f2 = {1}", name, str1.f2);
 }
示例#5
0
 //return the struct CharSetUnicodeSequential instance
 public static CharSetUnicodeSequential NewCharSetUnicodeSequential(string f1, char f2)
 {
     CharSetUnicodeSequential str1 = new CharSetUnicodeSequential();
     str1.f1 = f1;
     str1.f2 = f2;
     return str1;
 }
示例#6
0
 //print the struct CharSetUnicodeSequential element
 public static void PrintCharSetUnicodeSequential(CharSetUnicodeSequential str1, string name)
 {
     Console.WriteLine("\t{0}.f1 = {1}", name, str1.f1);
     Console.WriteLine("\t{0}.f2 = {1}", name, str1.f2);
 }
 static extern bool MarshalStructAsParam_AsSeqByRefOut4(out CharSetUnicodeSequential str1);
 static extern bool MarshalStructAsParam_AsSeqByVal4(CharSetUnicodeSequential str1);