FreezableCollection<T> Constructor (IEnumerable<T>)


Initializes a new instance of the FreezableCollection<T> class that contains the same elements as the specified collection.

Namespace:   System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)

public FreezableCollection(
	IEnumerable<T> collection


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

The collection whose items should be added to the new FreezableCollection<T>.

Exception Condition

collection is null.

This operation performs a shallow copy on the specified collection; only references to the collection's elements are copied, the elements themselves are not cloned. Modifying an element of the new FreezableCollection<T> also modifies that element for collection.

The elements are placed in the new FreezableCollection<T> in the same order they are read by the enumerator of the specified collection.

.NET Framework
Available since 3.0
Return to top