ZipItem.Comment Property
Gets or sets a text comment for the zip item.
Namespace: DevExpress.Compression
Assembly: DevExpress.Docs.v24.1.dll
NuGet Package: DevExpress.Document.Processor
Declaration
Property Value
Type | Description |
---|---|
String | A string that is stored in an archive as a comment to the zip item. |
Remarks
This example adds a text comment to each zip item in the archive that indicates the person who is currently logged on.
using DevExpress.Compression;
//...
public void ArchiveWithComment() {
string path = this.startupPath;
using (ZipArchive archive = new ZipArchive()) {
foreach (string file in System.IO.Directory.EnumerateFiles(path)) {
ZipFileItem zipFI = archive.AddFile(file, "/");
zipFI.Comment = "Archived by " + Environment.UserName;
}
archive.Save("ArchiveWithComment.zip");
}
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Comment property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.