I need to split an array of indeterminate size, at the midpoint, into two separate arrays.
The array is generated from a list of strings using ToArray().
<
Why don't you allocate two arrays and copy the contents ?
EDIT: here you go:
String[] origin = new String[4];
origin[0] = "zero";
origin[1] = "one";
origin[2] = "two";
origin[3] = "three";
Int32 topSize = origin.Length / 2;
Int32 bottomSize = origin.Length - topSize;
String[] sTop = new String[topSize];
String[] sBottom = new String[bottomSize];
Array.Copy(origin, sTop, topSize);
Array.Copy(origin, topSize , sBottom, 0, bottomSize);