Collection(T) Constructor (IList(T))
Collapse the table of content
Expand the table of content

Collection<T> Constructor (IList<T>)


Initializes a new instance of the Collection<T> class as a wrapper for the specified list.

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

public Collection(
	IList<T> list


Type: System.Collections.Generic.IList<T>

The list that is wrapped by the new collection.

Exception Condition

list is null.

The elements of the list are not copied. The list is wrapped by the collection, so that subsequent changes to the elements of the list are visible through the Collection<T>.

This constructor is an O(1) operation.

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
© 2015 Microsoft