2
Answers

C# Systems.Reflection on IonicZip.dll


I have been using Reflection to use Ionic.Zip.dll. I am able to create an instance of the ZipFile type but not able to access the Read method to extract a file.

Kindly share your thoughts. Thanks

  1. var DLL = Assembly.LoadFile(@"C:\Tools Use\Ionic.Zip.dll");  
  2.         var ZipFile = DLL.GetType("Ionic.Zip.ZipFile");  
  3.         var c = Activator.CreateInstance(ZipFile);  
  4.         var method = ZipFile.GetMethod("Read", BindingFlags.Static);  
  5.         //var method = theType.GetMethod("Read");  
  6.         //method.Invoke(c, new object[] { @"C:\Source\Filea" });  
 
Answers (2)