Skip to main content
.NET Framework 4.5.2+

ZipItem.Comment Property

Gets or sets a text comment for the zip item.

Namespace: DevExpress.Compression

Assembly: DevExpress.Docs.v22.2.dll

Declaration

public string Comment { get; set; }

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.

View Example

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("Documents\\ArchiveWithComment.zip");

            }
        }

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.

See Also