語言

ItemCollection.Add(Object) 方法

定義

將一個項目加入 ItemCollection。

public:
 virtual int Add(System::Object ^ newItem);
public int Add(object newItem);
abstract member Add : obj -> int
override this.Add : obj -> int
Public Function Add (newItem As Object) As Integer

參數

newItem
Object

要加入收藏的物品。

傳回

物件加入時的零基索引;若無法加入則 -1。

實作

例外狀況

這個收藏目前是 ItemsSource 模式。

適用於

另請參閱