Bearbeiten

Freigeben über


FreezableCollection<T> Constructors

Definition

Initializes a new instance of FreezableCollection<T>.

Overloads

FreezableCollection<T>()

Initializes a new instance of FreezableCollection<T> that is empty and has the default initial capacity.

FreezableCollection<T>(IEnumerable<T>)

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

FreezableCollection<T>(Int32)

Initializes a new instance of the FreezableCollection<T> that is empty and has the specified initial capacity.

FreezableCollection<T>()

Initializes a new instance of FreezableCollection<T> that is empty and has the default initial capacity.

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

Applies to

FreezableCollection<T>(IEnumerable<T>)

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

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

Parameters

collection
IEnumerable<T>

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

Exceptions

collection is null.

Remarks

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.

Applies to

FreezableCollection<T>(Int32)

Initializes a new instance of the FreezableCollection<T> that is empty and has the specified initial capacity.

public:
 FreezableCollection(int capacity);
public FreezableCollection (int capacity);
new System.Windows.FreezableCollection<'T (requires 'T :> System.Windows.DependencyObject)> : int -> System.Windows.FreezableCollection<'T (requires 'T :> System.Windows.DependencyObject)>
Public Sub New (capacity As Integer)

Parameters

capacity
Int32

A value that is greater than or equal to 0 that specifies the number of elements the new collection can initially store.

Exceptions

capacity is less than 0.

Applies to