ListBox.ObjectCollection.IList.Add(Object) メソッド

定義

オブジェクトを ListBox クラスに追加します。

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

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

パラメーター

item
Object

ListBox に追加するオブジェクト。

戻り値

Int32

新しい要素が挿入された位置、またはアイテムがコレクションに挿入されなかったことを示す -1 です。

実装

例外

itemnullです。

現在の ListBox にデータ ソースが割り当てられています。

新しい項目を格納するための領域が不足しています。

注釈

このメンバーは、明示的なインターフェイス メンバーの実装です。 これは、ListBox.ObjectCollection のインスタンスが IList インターフェイスにキャストされる場合のみ、使用できます。

適用対象