ObservableCollection<T> Construtores
Definição
Inicializa uma nova instância da classe ObservableCollection<T>.Initializes a new instance of the ObservableCollection<T> class.
Sobrecargas
ObservableCollection<T>() |
Inicializa uma nova instância da classe ObservableCollection<T>.Initializes a new instance of the ObservableCollection<T> class. |
ObservableCollection<T>(IEnumerable<T>) |
Inicializa uma nova instância da classe ObservableCollection<T> que contém elementos copiados da coleção especificada.Initializes a new instance of the ObservableCollection<T> class that contains elements copied from the specified collection. |
ObservableCollection<T>(List<T>) |
Inicializa uma nova instância da classe ObservableCollection<T> que contém elementos copiados da lista especificada.Initializes a new instance of the ObservableCollection<T> class that contains elements copied from the specified list. |
ObservableCollection<T>()
Inicializa uma nova instância da classe ObservableCollection<T>.Initializes a new instance of the ObservableCollection<T> class.
public:
ObservableCollection();
public ObservableCollection ();
Public Sub New ()
Aplica-se a
ObservableCollection<T>(IEnumerable<T>)
Inicializa uma nova instância da classe ObservableCollection<T> que contém elementos copiados da coleção especificada.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))
Parâmetros
- collection
- IEnumerable<T>
A coleção da qual os elementos são copiados.The collection from which the elements are copied.
Exceções
O parâmetro collection
não pode ser null
.The collection
parameter cannot be null
.
Comentários
Os elementos são copiados para o ObservableCollection<T> na mesma ordem em que são lidos pelo enumerador da coleção.The elements are copied onto the ObservableCollection<T> in the same order they are read by the enumerator of the collection.
Aplica-se a
ObservableCollection<T>(List<T>)
Inicializa uma nova instância da classe ObservableCollection<T> que contém elementos copiados da lista especificada.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))
Parâmetros
- list
- List<T>
A lista da qual os elementos são copiados.The list from which the elements are copied.
Exceções
O parâmetro list
não pode ser null
.The list
parameter cannot be null
.
Comentários
Os elementos são copiados para o ObservableCollection<T> na mesma ordem em que são lidos pelo enumerador da lista.The elements are copied onto the ObservableCollection<T> in the same order they are read by the enumerator of the list.