New to Telerik UI for WinFormsStart a free 30-day trial

Represents a collection of objects. It can be used in a property grid to edit the common properties of the objects.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class MultiObjectCollection : IEnumerable

Inheritance: objectMultiObjectCollection

Implements: IEnumerable

Constructors

Creates a new empty MultiObjectCollection.

C#
public MultiObjectCollection()

Creates a new MultiObjectCollection with the specified objects.

C#
public MultiObjectCollection(object[] objects)
Parameters:objectsobject[]

The objects to fill the collection with.

Properties

Gets the number of items currently in the collection.

C#
public int Count { get; }

Gets a value indicating whether the collection si read only. Always returns false.

C#
public bool IsReadOnly { get; }

Gets or sets the object on the specified index.

C#
public object this[int index] { get; set; }
Parameters:indexint

The index of the object

Methods

Adds an object to the collection.

C#
public void Add(object item)
Parameters:itemobject

The object to add.

Clears the entire collection.

C#
public void Clear()

Checks whether the collection contains the given object.

C#
public bool Contains(object item)
Parameters:itemobject

The object to check for.

Returns:

bool

True if the object is present in the collection, otherwise false.

Copies the objects from the collection to a specified array starting at the given index.

C#
public void CopyTo(object[] array, int arrayIndex)
Parameters:arrayobject[]

The destination array.

arrayIndexint

The index to start at in the destination array.

Gets the index of a given object.

C#
public int IndexOf(object item)
Parameters:itemobject

The object to look for.

Returns:

int

The index of the object or -1 if the object is not present in the collection.

Inserts an object in the given index.

C#
public void Insert(int index, object item)
Parameters:indexint

The index to insert on.

itemobject

The object to insert.

Removes a specified object from the collection.

C#
public bool Remove(object item)
Parameters:itemobject

The object to remove.

Returns:

bool

True if the object was removed otherwise false.

Removes an object from the specified index.

C#
public void RemoveAt(int index)
Parameters:indexint

The index to remove from.