public static Array matrix(Type elementType, params int[] lengths) { if (null == elementType) { throw new ArgumentNullException("elementType"); } return Array.CreateInstance(elementType, lengths); }