GemBox.Document
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    CommentCollection Class

    Namespace:
    GemBox.Document
    Assembly:
    GemBox.Document.dll

    Represents a collection of Comments.

    • C#
    • VB.NET
    public sealed class CommentCollection : ElementCollection, IList, ICollection, IList<Comment>, ICollection<Comment>, IEnumerable<Comment>, IEnumerable
    Public NotInheritable Class CommentCollection
        Inherits ElementCollection
        Implements IList, ICollection, IList(Of Comment), ICollection(Of Comment), IEnumerable(Of Comment), IEnumerable
    Inheritance:
    System.Object
    ElementCollection
    CommentCollection
    Implements
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.Generic.IList<Comment>
    System.Collections.Generic.ICollection<Comment>
    System.Collections.Generic.IEnumerable<Comment>
    System.Collections.IEnumerable
    Remarks

    CommentCollection is used in a Comments property.

    Comments collection contains all bookmarks in the document. Use Comments collection to retrieve a Comment, iterate over all comments or remove a comment.

    Properties

    Item[Int32]

    Gets the Comment at the specified index.

    • C#
    • VB.NET
    [ComVisible(false)]
    public Comment this[int index] { get; }
    <ComVisible(False)>
    Public ReadOnly Property Item(index As Integer) As Comment
    Parameters
    index
    System.Int32

    The zero-based index of the Comment to get.

    Property Value
    Comment

    The Comment at the specified index.

    Methods

    Contains(Comment)

    Determines whether an element is in the CommentCollection.

    • C#
    • VB.NET
    public bool Contains(Comment item)
    Public Function Contains(item As Comment) As Boolean
    Parameters
    item
    Comment

    The element to locate in the CommentCollection.

    Returns
    System.Boolean

    true if item is found in the CommentCollection; otherwise, false.

    CopyTo(Comment[], Int32)

    Copies the entire CommentCollection to a compatible one-dimensional array, starting at the specified index of the target array.

    • C#
    • VB.NET
    public void CopyTo(Comment[] array, int arrayIndex)
    Public Sub CopyTo(array As Comment(), arrayIndex As Integer)
    Parameters
    array
    Comment[]

    The one-dimensional array that is the destination of the elements copied from CommentCollection.

    arrayIndex
    System.Int32

    The zero-based index in array at which copying begins.

    GetEnumerator()

    Returns an enumerator that iterates through the CommentCollection.

    • C#
    • VB.NET
    public IEnumerator<Comment> GetEnumerator()
    Public Function GetEnumerator As IEnumerator(Of Comment)
    Returns
    System.Collections.Generic.IEnumerator<Comment>

    An enumerator for the CommentCollection.

    IndexOf(Comment)

    Searches for the specified element and returns the zero-based index of the first occurrence within the entire CommentCollection.

    • C#
    • VB.NET
    public int IndexOf(Comment item)
    Public Function IndexOf(item As Comment) As Integer
    Parameters
    item
    Comment

    The element to locate in the CommentCollection.

    Returns
    System.Int32

    The zero-based index of the first occurrence of item within the entire CommentCollection, if found; otherwise, -1.

    Remove(Comment)

    Removes the first occurrence of a specific element from the CommentCollection.

    • C#
    • VB.NET
    public bool Remove(Comment item)
    Public Function Remove(item As Comment) As Boolean
    Parameters
    item
    Comment

    The element from the CommentCollection.

    Returns
    System.Boolean

    true if item is successfully removed; otherwise, false. This method also returns false if item was not found in the CommentCollection.

    Inherited Properties

    Content

    Gets the content of the current ElementCollection.

    (Inherited from ElementCollection)

    Count

    Gets the number of elements contained in the ElementCollection.

    (Inherited from ElementCollection)

    SupportedElementTypes

    Gets a sequence of ElementTypes that can be contained in this collection.

    (Inherited from ElementCollection)

    Inherited Methods

    Clear()

    Removes all elements from the ElementCollection.

    (Inherited from ElementCollection)

    CopyTo(Element[], System.Int32)

    Copies the elements of the ElementCollection to an System.Array, starting at a particular System.Array index.

    (Inherited from ElementCollection)

    IndexOf(Element)

    Determines the index of a specific Element in the ElementCollection.

    (Inherited from ElementCollection)

    RemoveAt(System.Int32)

    Removes the element at the specified index of the ElementCollection.

    (Inherited from ElementCollection)

    Implements

    System.Collections.IList
    System.Collections.ICollection
    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    See Also

    Comments
    Comment
    CommentStart
    CommentEnd
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.