BindingList<T>.AddNewCore Método
Definição
Adiciona um novo item ao final da coleção.Adds a new item to the end of the collection.
protected:
virtual System::Object ^ AddNewCore();
protected virtual object AddNewCore ();
abstract member AddNewCore : unit -> obj
override this.AddNewCore : unit -> obj
Protected Overridable Function AddNewCore () As Object
Retornos
O item que foi adicionado à coleção.The item that was added to the collection.
Exceções
O novo item não é do mesmo tipo que os objetos contidos no BindingList<T>.The new item is not the same type as the objects contained in the BindingList<T>.
Comentários
O AddNewCore método adiciona um novo item à coleção representada pela Items propriedade.The AddNewCore method adds a new item to the collection represented by the Items property. AddNewCore raises the AddingNew .AddNewCore raises the AddingNew event. Isso permite que você adicione um novo item definindo a NewObject Propriedade do AddingNewEventArgs parâmetro para o novo item.This allows you to add a new item by setting the NewObject property of the AddingNewEventArgs parameter to the new item. Caso contrário, o novo item será criado automaticamente por meio de seu construtor público sem parâmetros.Otherwise, the new item is automatically created through its public parameterless constructor.