日期:2014-05-18  浏览次数:20677 次

在zip文件里找一个文件
我的c#实在太差了,谁能给点code学习学习。
怎么在一个zip文件里找一个比如a.xml的文件,如果找到返回true没找到返回false。跪谢。

------解决方案--------------------
using (ZipInputStream s = new ZipInputStream(File.OpenRead(args[0]))) {

ZipEntry theEntry;
while ((theEntry = s.GetNextEntry()) != null) {

if(FileName==theEntry.Name)
{
return true;
}



}
}

要用到ICSharpCode.SharpZipLib.dll