New test.
[mono.git] / mcs / tests / gtest-185.cs
1 public class App {
2   public static void Main() {
3     FP.appendArrays(new int[] {1, 2}, new int[] {3, 4});
4   }
5 }
6
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++;
18         }
19       return result;
20     }
21 }