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

    Show / Hide Table of Contents

    Collection Class

    Namespace:
    GemBox.Presentation
    Assembly:
    GemBox.Presentation.dll

    Represents a base non-generic type for all collection types in the GemBox.Presentation assembly.

    • C#
    • VB.NET
    public abstract class Collection : IList, ICollection, IEnumerable
    Public MustInherit Class Collection
        Implements IList, ICollection, IEnumerable
    Inheritance:
    System.Object
    Collection
    Derived
    Collection<T>
    Implements
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable

    Properties

    Count

    Gets the number of items contained in the collection.

    • C#
    • VB.NET
    public int Count { get; }
    Public ReadOnly Property Count As Integer
    Property Value
    System.Int32

    The number of items contained in the collection.

    Item[Int32]

    Gets the item at the specified index.

    • C#
    • VB.NET
    public object this[int index] { get; }
    Public ReadOnly Property Item(index As Integer) As Object
    Parameters
    index
    System.Int32

    The zero-based index of the item to get.

    Property Value
    System.Object

    The item at the specified index.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than zero or index is equal to or greater than Count.

    Methods

    Clear()

    Removes all items from the collection.

    • C#
    • VB.NET
    public void Clear()
    Public Sub Clear

    GetEnumerator()

    Returns an enumerator that iterates through the collection.

    • C#
    • VB.NET
    public IEnumerator GetEnumerator()
    Public Function GetEnumerator As IEnumerator
    Returns
    System.Collections.IEnumerator

    An System.Collections.IEnumerator for the collection.

    RemoveAt(Int32)

    Removes the item at the specified index of the collection.

    • C#
    • VB.NET
    public void RemoveAt(int index)
    Public Sub RemoveAt(index As Integer)
    Parameters
    index
    System.Int32

    The zero-based index of the item to remove.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than zero or index is equal to or greater than Count.

    Implements

    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable

    See Also

    Collection<T>
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.