語言

Collection.IList.Add(Object) 方法

定義

將專案加入至集合。

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

參數

valueItem
Object

要加入收藏的物品。

傳回

新元素插入的位置,或 -1 表示該項目未入集合。

適用於