(C#) Transition from Zip.GetEntryByID to Zip.EntryById
Provides instructions for replacing deprecated GetEntryByID method calls with EntryById. Note: This example requires Chilkat v11.0.0 or greater.
Chilkat.Zip zip = new Chilkat.Zip();
// ...
// ...
int id = 123;
// ------------------------------------------------------------------------
// The GetEntryByID method is deprecated:
Chilkat.ZipEntry entryObj = zip.GetEntryByID(id);
if (zip.LastMethodSuccess == false) {
Debug.WriteLine(zip.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using EntryById.
// Your application creates a new, empty ZipEntry object which is passed
// in the last argument and filled upon success.
Chilkat.ZipEntry ze = new Chilkat.ZipEntry();
bool success = zip.EntryById(id,ze);
if (success == false) {
Debug.WriteLine(zip.LastErrorText);
return;
}
|