StateManagedCollection.IList.Add(Object) 方法

定義

將項目加入 StateManagedCollection 集合。Adds an item to the StateManagedCollection collection.

 virtual int System.Collections.IList.Add(System::Object ^ value) = System::Collections::IList::Add;
int IList.Add (object value);
abstract member System.Collections.IList.Add : obj -> int
override this.System.Collections.IList.Add : obj -> int
Function Add (value As Object) As Integer Implements IList.Add

參數

value
Object

要加入至 objectStateManagedCollectionThe object to add to the StateManagedCollection.

傳回

Int32

插入新項目的位置。The position at which the new element was inserted.

實作

例外狀況

指定的 valuenullThe specified value is null.

備註

OnValidate OnInsert 將專案加入至集合之前,會呼叫和方法,並在 OnInsertComplete 加入元素之後呼叫方法。The OnValidate and OnInsert methods are called before the element is added to the collection, and the OnInsertComplete method is called after the element is added.

適用於

另請參閱