ParserGetContainer Method |
Namespace: GroupDocs.Parser
The following example shows how to extract attachments from a container:
// Create an instance of Parser class using(Parser parser = new Parser(filePath)) { // Extract attachments from the container IEnumerable<ContainerItem> attachments = parser.GetContainer(); // Check if container extraction is supported if(attachments == null) { Console.WriteLine("Container extraction isn't supported"); } // Iterate over attachments foreach(ContainerItem item in attachments) { // Print an item name and size Console.WriteLine(string.Format("{0}: {1}", item.Name, item.Size)); } }