alexa
Syncfusion
menu Syncfusion

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class OfficeDigitalSignatureCollection

    Represents a collection of digital signatures from a document.

    Inheritance
    object
    OfficeDigitalSignatureCollection
    Implements
    IEnumerable<OfficeDigitalSignature>
    IEnumerable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Office
    Assembly: Syncfusion.Compression.NET.dll
    Syntax
    public class OfficeDigitalSignatureCollection : IEnumerable<OfficeDigitalSignature>, IEnumerable

    Constructors

    OfficeDigitalSignatureCollection()

    Initializes a new instance of the OfficeDigitalSignatureCollection class.

    Declaration
    public OfficeDigitalSignatureCollection()
    Examples
    //Open an existing Word document from a file
    WordDocument document = new WordDocument(@"C:\Data\SampleDocument.docx");
    //Access the collection of digital signatures from the document
    OfficeDigitalSignatureCollection signatures = document.DigitalSignatures;
    Console.WriteLine(signatures.Count);
    document.Close();

    Properties

    Count

    Gets the number of digital signatures in the collection.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int

    The total number of OfficeDigitalSignature items in the collection.

    Examples
    //Open a signed Word document from a file
    WordDocument document = new WordDocument(@"C:\Data\SignedDocument.docx");
    //Read the number of signatures in the document
    int count = document.DigitalSignatures.Count;
    Console.WriteLine(count);
    document.Close();

    IsValid

    Gets a value indicating whether all digital signatures in the collection are valid.

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    bool

    true if all digital signatures are valid; otherwise, false.

    Examples
    //Open a signed Word document from a file
    WordDocument document = new WordDocument(@"C:\Data\SignedDocument.docx");
    //Check whether every signature in the document is valid
    bool allValid = document.DigitalSignatures.IsValid;
    Console.WriteLine(allValid);
    document.Close();

    this[int]

    Gets the digital signature at the specified index.

    Declaration
    public OfficeDigitalSignature this[int index] { get; }
    Parameters
    Type Name Description
    int index

    The zero-based index of the digital signature to retrieve.

    Property Value
    Type Description
    OfficeDigitalSignature

    The OfficeDigitalSignature instance at the specified index.

    Examples
    //Open a signed Word document from a file
    WordDocument document = new WordDocument(@"C:\Data\SignedDocument.docx");
    //Retrieve the first signature by index
    OfficeDigitalSignature signature = document.DigitalSignatures[0];
    Console.WriteLine(signature.Comments);
    document.Close();
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    The index is less than zero or greater than or equal to the collection count.

    Methods

    GetEnumerator()

    Returns an enumerator that iterates through the digital signatures in the collection.

    Declaration
    public IEnumerator<OfficeDigitalSignature> GetEnumerator()
    Returns
    Type Description
    IEnumerator<OfficeDigitalSignature>

    An enumerator for the collection.

    Examples
    //Open a signed Word document from a file
    WordDocument document = new WordDocument(@"C:\Data\SignedDocument.docx");
    //Iterate over every signature in the document
    foreach (OfficeDigitalSignature signature in document.DigitalSignatures)
    {
        Console.WriteLine(signature.Comments);
    }
    document.Close();

    Implements

    IEnumerable<T>
    IEnumerable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved