ObservableCollection(T) Constructor (IEnumerable(T))
Collapse the table of content
Expand the table of content

ObservableCollection<T> Constructor (IEnumerable<T>)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Initializes a new instance of the ObservableCollection<T> class and populates it with items copied from the specified collection.

Namespace:  System.Collections.ObjectModel
Assembly:  System (in System.dll)

public ObservableCollection(
	IEnumerable<T> collection
)

Parameters

collection
Type: System.Collections.Generic.IEnumerable<T>
The collection from which the items are copied.

ExceptionCondition
ArgumentNullException

collection is null.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2016 Microsoft