diff --git a/CS2JLibrary/NetFramework/System/Collections/ArrayList.xml b/CS2JLibrary/NetFramework/System/Collections/ArrayList.xml
index a066520..ab16013 100644
--- a/CS2JLibrary/NetFramework/System/Collections/ArrayList.xml
+++ b/CS2JLibrary/NetFramework/System/Collections/ArrayList.xml
@@ -109,8 +109,10 @@
System.Void
-
- ${this:16}.toArray(new ${TYPEOF_expr_TYPE}[0])
+
+ RusticiSoftware.System.Collections.ArrayListSupport
+
+ ArrayListSupport.toArray(${this}, new ${TYPEOF_expr_TYPE}[0])
System.Type
diff --git a/CS2JLibrary/src/RusticiSoftware/System/Collections/ArrayListSupport.java b/CS2JLibrary/src/RusticiSoftware/System/Collections/ArrayListSupport.java
index 91f61fa..806ad69 100755
--- a/CS2JLibrary/src/RusticiSoftware/System/Collections/ArrayListSupport.java
+++ b/CS2JLibrary/src/RusticiSoftware/System/Collections/ArrayListSupport.java
@@ -84,15 +84,36 @@ public class ArrayListSupport extends AbstractCollection implements List {
return (T[]) al.toArray(dummy);
}
- public int[] toArrayS(int[] dummy)
- {
- int idx = 0;
- int[] arrayInt = new int[al.size()];
- for(int v : (ArrayList)al)
- arrayInt[idx++] = v;
- return arrayInt;
- }
-
+ public int[] toArrayS(int[] dummy)
+ {
+ int idx = 0;
+ int[] arrayInt = new int[al.size()];
+ for(int v : (ArrayList)al)
+ arrayInt[idx++] = v;
+ return arrayInt;
+ }
+
+// public static Object[] toArray(ArrayList al)
+// {
+// int idx = 0;
+// Object[] arr = new Object[al.size()];
+// for(Object v : al)
+// arr[idx++] = v;
+// return arr;
+// }
+ public static T[] toArray(ArrayList al, T[] dummy)
+ {
+ return (T[]) al.toArray(dummy);
+ }
+ public static int[] toArray(ArrayList al, int[] dummy)
+ {
+ int idx = 0;
+ int[] arrayInt = new int[al.size()];
+ for(int v : (ArrayList)al)
+ arrayInt[idx++] = v;
+ return arrayInt;
+ }
+
public Object[] toArray()
{
return al.toArray();