jdcoburn
asked on
zip file open and reading in C#
hi - I'm using VS2010 and .net 4.0 and for program reasons can't upgrade to 4.5. I'm trying to open and read the contents of a zip file so that I can create a data set internal to my program (ie I have no need to create the rest of the zip operation of placing unzipped files somewhere.) I've looked at the Microsoft example code in their Package class that deals with zips and there is reference to an attribute that's not explained. specifically, in the foreach statement to get relationships, the line reads"\
"foreach ( PackageRelationship relationship in documentPart.GetRelationsh ipByType(R esourceRel ationshipT ype))
the ResourceRelationshipType is undefined if I compile as is. the method is calling for a string, but I don't know where to find the ResourceRelationshipTypes list.
any suggestions?
thanks,
"foreach ( PackageRelationship relationship in documentPart.GetRelationsh
the ResourceRelationshipType is undefined if I compile as is. the method is calling for a string, but I don't know where to find the ResourceRelationshipTypes list.
any suggestions?
thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Can you provide a link to the page that has the code example?
ASKER
it worked fine, but I had to modify several methods to get it to work.
Open in new window
Note: The code sample is a simplified version of Nicholas Carey's answer.