The following example shows how to extract attachments from a container:
// Create an instance of Parser classusing(Parserparser=newParser(filePath)){// Extract attachments from the containerIEnumerable<ContainerItem>attachments=parser.GetContainer();// Check if container extraction is supportedif(attachments==null){Console.WriteLine("Container extraction isn't supported");}// Iterate over attachmentsforeach(ContainerItemiteminattachments){// Print an item name and sizeConsole.WriteLine(string.Format("{0}: {1}",item.Name,item.Size));}}