private ArrayInfo getArrayInfo(Type arrayType) { // Caching is innacceptable, as an array of type string can have different bounds var info = new ArrayInfo(); // Fill the dimension infos for (int dimension = 0; dimension < getRank(arrayType); dimension++) { var dimensionInfo = new DimensionInfo(); dimensionInfo.Length = getLength(dimension, arrayType); dimensionInfo.LowerBound = getLowerBound(dimension, arrayType); info.DimensionInfos.Add(dimensionInfo); } return(info); }