积极答复者
如何在Metro App里压缩文件?

问题
答案
-
您好!
您可以用 ZipArchive Class 压缩文件。需要引用命名空间 System.IO.Compression。
另外,请注意ZipFile和ZipFileExtensions类不能用于Metro Style App,因为这两个类需要引用System.IO.Compression.FileSystem Assembly,但是这个Assembly不能用于Metro Style App。Best wishes,
Robin [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已建议为答案 Jie BaoModerator 2012年3月26日 2:43
- 已标记为答案 Sky Driver 2012年4月3日 8:51
全部回复
-
您好!
您可以用 ZipArchive Class 压缩文件。需要引用命名空间 System.IO.Compression。
另外,请注意ZipFile和ZipFileExtensions类不能用于Metro Style App,因为这两个类需要引用System.IO.Compression.FileSystem Assembly,但是这个Assembly不能用于Metro Style App。Best wishes,
Robin [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已建议为答案 Jie BaoModerator 2012年3月26日 2:43
- 已标记为答案 Sky Driver 2012年4月3日 8:51