public static HwpV3DocumentInformationBlockCollection Create(BinaryReader reader, HwpV3DocumentInformation docinfo) { HwpV3DocumentInformationBlockCollection results = new HwpV3DocumentInformationBlockCollection(); results.Length = docinfo.InformationBlockLength; using (MemoryStream memStream = new MemoryStream(reader.ReadBytes((int)results.Length))) using (BinaryReader subReader = new BinaryReader(memStream)) { while (memStream.Position < memStream.Length) { results.Add(HwpV3DocumentInformationBlock.Create(subReader)); } } return(results); }