Back to Devexpress

ComboBoxItemCollection.Assign(ComboBoxItemCollection) Method

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-comboboxitemcollection-dot-assign-x28-devexpress-dot-xtraeditors-dot-controls-dot-comboboxitemcollection-x29.md

latest1.8 KB
Original Source

ComboBoxItemCollection.Assign(ComboBoxItemCollection) Method

Copies items from the source collection to the current collection.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public virtual void Assign(
    ComboBoxItemCollection collection
)
vb
Public Overridable Sub Assign(
    collection As ComboBoxItemCollection
)

Parameters

NameTypeDescription
collectionComboBoxItemCollection

The source collection whose items are copied to the current collection.

|

Remarks

The Assign method removes all items from the current collection and then copies elements from the source collection to the current one. Assign copies object references, not the objects themselves. So items in the both collections will refer to the same data.

The Assign method maintains the object model of the XtraEditors Library and is not intended to be used from your code.

See Also

ComboBoxItemCollection Class

ComboBoxItemCollection Members

DevExpress.XtraEditors.Controls Namespace