Author: martin
Date: 2005-07-06 13:48:25 -0400 (Wed, 06 Jul 2005)
New Revision: 47014

Added:
   trunk/mcs/tests/gtest-185.cs
Log:
New test.


Added: trunk/mcs/tests/gtest-185.cs
===================================================================
--- trunk/mcs/tests/gtest-185.cs        2005-07-06 17:31:15 UTC (rev 47013)
+++ trunk/mcs/tests/gtest-185.cs        2005-07-06 17:48:25 UTC (rev 47014)
@@ -0,0 +1,21 @@
+public class App {
+  public static void Main() {
+    FP.appendArrays(new int[] {1, 2}, new int[] {3, 4});
+  }
+}
+
+class FP {
+    public static T[] appendArrays<T>(params T[][] arrays) {
+      int length = 0;
+      foreach (T[] array in arrays)
+        length += array.Length;
+      T[] result = new T[length];
+      int k = 0;
+      foreach (T[] array in arrays)
+        foreach (T obj in array) {
+          result[k] = obj;
+          k++;
+        }
+      return result;
+    }
+}


Property changes on: trunk/mcs/tests/gtest-185.cs
___________________________________________________________________
Name: svn:executable
   + *

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to