.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

ZipItem.Comment Property

Gets or sets a text comment for the zip item.

Namespace: DevExpress.Compression

Assembly: DevExpress.Docs.v21.1.dll


public string Comment { get; set; }

Property Value

Type Description

A string that is stored in an archive as a comment to the zip item.


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;

See Also