public object Get(INXmlElementReader nodeReader) { var valuesList = new ArrayList(); using (var itemNodes = nodeReader.GetNextChildNode("items")) { INXmlElementReader itemNode; while ((itemNode = itemNodes.GetNextChildNode()) != null) { if (objectReader.CanRead(itemNode)) { valuesList.Add(objectReader.Get(itemNode)); } itemNode.Dispose(); } } var elementType = typeFinder.GetType(nodeReader.Attributes.Get("type")).GetElementType(); var objectInstance = valuesList.ToArray(elementType.GetTargetType()); readObjects.Add(nodeReader.Attributes.GetInteger("ID"), objectInstance); return(objectInstance); }