2010-06-21 Atsushi Enomoto <atsushi@ximian.com>
[mcs.git] / tests / gtest-185.cs
blob994e0d5aceec6401dcd4d67a4a00f945f94ad334
1 public class App {
2 public static void Main() {
3 FP.appendArrays(new int[] {1, 2}, new int[] {3, 4});
7 class FP {
8 public static T[] appendArrays<T>(params T[][] arrays) {
9 int length = 0;
10 foreach (T[] array in arrays)
11 length += array.Length;
12 T[] result = new T[length];
13 int k = 0;
14 foreach (T[] array in arrays)
15 foreach (T obj in array) {
16 result[k] = obj;
17 k++;
19 return result;