ObservableCollection<T> ObservableCollection<T> ObservableCollection<T> ObservableCollection<T> Constructors

Definition

Overloads

ObservableCollection<T>() ObservableCollection<T>() ObservableCollection<T>()

Initializes a new instance of the ObservableCollection<T> class.

ObservableCollection<T>(IEnumerable<T>) ObservableCollection<T>(IEnumerable<T>) ObservableCollection<T>(IEnumerable<T>) ObservableCollection<T>(IEnumerable<T>)

Initializes a new instance of the ObservableCollection<T> class that contains elements copied from the specified collection.

ObservableCollection<T>(List<T>) ObservableCollection<T>(List<T>) ObservableCollection<T>(List<T>) ObservableCollection<T>(List<T>)

Initializes a new instance of the ObservableCollection<T> class that contains elements copied from the specified list.

ObservableCollection<T>() ObservableCollection<T>() ObservableCollection<T>()

Initializes a new instance of the ObservableCollection<T> class.

public:
 ObservableCollection();
public ObservableCollection ();
Public Sub New ()

ObservableCollection<T>(IEnumerable<T>) ObservableCollection<T>(IEnumerable<T>) ObservableCollection<T>(IEnumerable<T>) ObservableCollection<T>(IEnumerable<T>)

Initializes a new instance of the ObservableCollection<T> class that contains elements copied from the specified collection.

public:
 ObservableCollection(System::Collections::Generic::IEnumerable<T> ^ collection);
public ObservableCollection (System.Collections.Generic.IEnumerable<T> collection);
new System.Collections.ObjectModel.ObservableCollection<'T> : seq<'T> -> System.Collections.ObjectModel.ObservableCollection<'T>
Public Sub New (collection As IEnumerable(Of T))

Parameters

collection
IEnumerable<T> IEnumerable<T> IEnumerable<T> IEnumerable<T>

The collection from which the elements are copied.

Exceptions

Remarks

The elements are copied onto the ObservableCollection<T> in the same order they are read by the enumerator of the collection.

ObservableCollection<T>(List<T>) ObservableCollection<T>(List<T>) ObservableCollection<T>(List<T>) ObservableCollection<T>(List<T>)

Initializes a new instance of the ObservableCollection<T> class that contains elements copied from the specified list.

public:
 ObservableCollection(System::Collections::Generic::List<T> ^ list);
public ObservableCollection (System.Collections.Generic.List<T> list);
new System.Collections.ObjectModel.ObservableCollection<'T> : System.Collections.Generic.List<'T> -> System.Collections.ObjectModel.ObservableCollection<'T>
Public Sub New (list As List(Of T))

Parameters

list
List<T> List<T> List<T> List<T>

The list from which the elements are copied.

Exceptions

Remarks

The elements are copied onto the ObservableCollection<T> in the same order they are read by the enumerator of the list.

Applies to