menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class CollectionWrapper - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class CollectionWrapper

    Defines the class that provides a wrapper around System.Collections.ArrayList. It is used to hold a set of non-generic collections.

    Inheritance
    System.Object
    CollectionWrapper
    Implements
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    System.ComponentModel.ITypedList
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Grouping
    Assembly: Syncfusion.Grouping.Base.dll
    Syntax
    public class CollectionWrapper : IList, ICollection, IEnumerable, ITypedList

    Constructors

    CollectionWrapper(ICollection)

    Initializes a new instance of the CollectionWrapper class for CollectionWrapper.

    Declaration
    public CollectionWrapper(ICollection inner)
    Parameters
    Type Name Description
    System.Collections.ICollection inner

    The collection.

    Properties

    Count

    Gets the value of number of elements in the list.

    Declaration
    public int Count { get; }
    Property Value
    Type
    System.Int32

    IsFixedSize

    Determines whether the list size is fixed or not.

    Declaration
    public bool IsFixedSize { get; }
    Property Value
    Type Description
    System.Boolean

    Returns True.

    IsReadOnly

    Determines whether the list is read-only or not.

    Declaration
    public bool IsReadOnly { get; }
    Property Value
    Type Description
    System.Boolean

    Returns True.

    IsSynchronized

    Gets a value that indicates whether access to this collection is synchronized or not.

    Declaration
    public bool IsSynchronized { get; }
    Property Value
    Type
    System.Boolean

    Item[Int32]

    Gets or sets the item at the specified index.

    Declaration
    public object this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index

    The index.

    Property Value
    Type
    System.Object

    SyncRoot

    Gets an object that can be used to synchronize access to the collection.

    Declaration
    public object SyncRoot { get; }
    Property Value
    Type
    System.Object

    Methods

    Add(Object)

    Adds a new item.

    Declaration
    public int Add(object value)
    Parameters
    Type Name Description
    System.Object value

    Item value.

    Returns
    Type Description
    System.Int32

    Returns -1.

    Clear()

    Clears the list.

    Declaration
    public void Clear()

    Contains(Object)

    Determines whether the list contains the specified item or not.

    Declaration
    public bool Contains(object value)
    Parameters
    Type Name Description
    System.Object value

    The Item value.

    Returns
    Type Description
    System.Boolean

    If Trueit contains the item specified; Otherwise False.

    CopyTo(Array, Int32)

    Copies the entire collection to a compatible one-dimensional array.

    Declaration
    public void CopyTo(Array array, int index)
    Parameters
    Type Name Description
    System.Array array

    One-dimensional array.

    System.Int32 index

    Start index.

    GetEnumerator()

    Gets the enumerator.

    Declaration
    public IEnumerator GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    Collection Wrapper enumerator.

    GetItemProperties(PropertyDescriptor[])

    Gets the System.ComponentModel.PropertyDescriptorCollection that represents the properties on each item used to bind data.

    Declaration
    public PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[] listAccessors)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptor[] listAccessors

    An array of System.ComponentModel.PropertyDescriptor objects to find in the collection as bind-able.

    Returns
    Type Description
    System.ComponentModel.PropertyDescriptorCollection

    The System.ComponentModel.PropertyDescriptorCollection.

    GetListName(PropertyDescriptor[])

    Gets the name of the list.

    Declaration
    public string GetListName(PropertyDescriptor[] listAccessors)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptor[] listAccessors

    An array of System.ComponentModel.PropertyDescriptor objects, for which the list name is returned.

    Returns
    Type Description
    System.String

    The list name.

    IndexOf(Object)

    Gets the zero-based index of the first occurrence of the given item in the list.

    Declaration
    public int IndexOf(object value)
    Parameters
    Type Name Description
    System.Object value

    Item value.

    Returns
    Type Description
    System.Int32

    Item index.

    Insert(Int32, Object)

    Inserts a value into the list at the specified index.

    Declaration
    public void Insert(int index, object value)
    Parameters
    Type Name Description
    System.Int32 index

    The index.

    System.Object value

    The value.

    Remove(Object)

    Removes the specified value from the list.

    Declaration
    public void Remove(object value)
    Parameters
    Type Name Description
    System.Object value

    The object value.

    RemoveAt(Int32)

    Removes the value at the specified index.

    Declaration
    public void RemoveAt(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The Index.

    Implements

    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    System.ComponentModel.ITypedList
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved