5 public static void BuildNode (ref string label
)
8 label
+= s
+ s
+ s
+ s
;
11 public static void BuildNode (ref string[] label
)
15 label
[idx
++] += s
+ s
+ s
+ s
;
18 public static void BuildNode_B (ref object label
)
24 public static string BuildNode_C (ref string label
)
26 string[] a
= new string [2];
31 a
[i
++] += label
+ s
+ s
+ s
;
35 public static string BuildNode_D ()
37 System
.Collections
.ArrayList values
= new System
.Collections
.ArrayList ();
38 for (int i
= 0; i
< 6; i
++)
40 string[] strs
= new string [values
.Count
];
42 foreach (int val
in values
) {
43 strs
[idx
] = "Value:";
44 strs
[idx
++] += val
.ToString ();
50 public static void BuildNode_E (ref string[,] label
)
54 label
= new string [1, 1];
55 label
[idx
++, idx
- 1] += s
+ s
+ s
+ s
;
58 static bool Test_Object ()
61 object[] o_a
= new string[] { "A" }
;
63 if ((string) o_a
[0] != "AZ")
67 object[,] o_a2
= new string[,] { { "X" }
};
69 if ((string) o_a2
[0, 0] != "XZ")
75 static bool Test_Decimal ()
77 decimal[,] da
= new decimal[,] { { 5, 6 }
};
87 public static int Main ()
92 Console
.WriteLine (str
);
93 if (str
!= "testaaaa")
97 BuildNode_B (ref ostr
);
98 Console
.WriteLine (ostr
);
99 if (ostr
.ToString () != "testbb")
103 string res
= BuildNode_C (ref str
);
104 Console
.WriteLine (str
);
108 Console
.WriteLine (res
);
109 if (res
!= "atestbbb")
112 string[] sa
= new string [1];
114 Console
.WriteLine (sa
[0]);
115 if (sa
[0] != "aaaa")
118 str
= BuildNode_D ();
119 Console
.WriteLine (str
);
120 if (str
!= "Value:5")
123 string[,] sa2
= null;
124 BuildNode_E (ref sa2
);
125 Console
.WriteLine (sa2
[0, 0]);
126 if (sa2
[0,0] != "aaaa")
132 if (!Test_Decimal ())