Class
MultiObjectCollection

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:

cs-api-definition
public class MultiObjectCollection : IEnumerable

Inheritance: objectMultiObjectCollection

Implements: IEnumerable

Constructors

MultiObjectCollection()

Creates a new empty MultiObjectCollection.

Declaration

cs-api-definition
public MultiObjectCollection()

MultiObjectCollection(object[])

Creates a new MultiObjectCollection with the specified objects.

Declaration

cs-api-definition
public MultiObjectCollection(object[] objects)

Parameters

objects

object[]

The objects to fill the collection with.

Properties

Count

Gets the number of items currently in the collection.

Declaration

cs-api-definition
public int Count { get; }

Property Value

int

IsReadOnly

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

Declaration

cs-api-definition
public bool IsReadOnly { get; }

Property Value

bool

this[int]

Gets or sets the object on the specified index.

Declaration

cs-api-definition
public object this[int index] { get; set; }

Parameters

index

int

The index of the object

Property Value

object

Methods

Add(object)

Adds an object to the collection.

Declaration

cs-api-definition
public void Add(object item)

Parameters

item

object

The object to add.

Clear()

Clears the entire collection.

Declaration

cs-api-definition
public void Clear()

Contains(object)

Checks whether the collection contains the given object.

Declaration

cs-api-definition
public bool Contains(object item)

Parameters

item

object

The object to check for.

Returns

bool

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

CopyTo(object[], int)

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

Declaration

cs-api-definition
public void CopyTo(object[] array, int arrayIndex)

Parameters

array

object[]

The destination array.

arrayIndex

int

The index to start at in the destination array.

IndexOf(object)

Gets the index of a given object.

Declaration

cs-api-definition
public int IndexOf(object item)

Parameters

item

object

The object to look for.

Returns

int

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

Insert(int, object)

Inserts an object in the given index.

Declaration

cs-api-definition
public void Insert(int index, object item)

Parameters

index

int

The index to insert on.

item

object

The object to insert.

Remove(object)

Removes a specified object from the collection.

Declaration

cs-api-definition
public bool Remove(object item)

Parameters

item

object

The object to remove.

Returns

bool

True if the object was removed otherwise false.

RemoveAt(int)

Removes an object from the specified index.

Declaration

cs-api-definition
public void RemoveAt(int index)

Parameters

index

int

The index to remove from.