ListBox.ObjectCollection ListBox.ObjectCollection ListBox.ObjectCollection ListBox.ObjectCollection Constructors

定義

多載

ListBox.ObjectCollection(ListBox) ListBox.ObjectCollection(ListBox) ListBox.ObjectCollection(ListBox) ListBox.ObjectCollection(ListBox)

初始化 ListBox.ObjectCollection 的新執行個體。Initializes a new instance of ListBox.ObjectCollection.

ListBox.ObjectCollection(ListBox, Object[]) ListBox.ObjectCollection(ListBox, Object[]) ListBox.ObjectCollection(ListBox, Object[]) ListBox.ObjectCollection(ListBox, Object[])

初始化 ListBox.ObjectCollection 的新執行個體,這個執行個體含有物件陣列。Initializes a new instance of ListBox.ObjectCollection containing an array of objects.

ListBox.ObjectCollection(ListBox, ListBox+ObjectCollection) ListBox.ObjectCollection(ListBox, ListBox+ObjectCollection) ListBox.ObjectCollection(ListBox, ListBox+ObjectCollection) ListBox.ObjectCollection(ListBox, ListBox+ObjectCollection)

初始化 ListBox.ObjectCollection 的新執行個體,這個執行個體以其他 ListBox.ObjectCollection 為基礎。Initializes a new instance of ListBox.ObjectCollection based on another ListBox.ObjectCollection.

ListBox.ObjectCollection(ListBox) ListBox.ObjectCollection(ListBox) ListBox.ObjectCollection(ListBox) ListBox.ObjectCollection(ListBox)

初始化 ListBox.ObjectCollection 的新執行個體。Initializes a new instance of ListBox.ObjectCollection.

public:
 ObjectCollection(System::Windows::Forms::ListBox ^ owner);
public ObjectCollection (System.Windows.Forms.ListBox owner);
new System.Windows.Forms.ListBox.ObjectCollection : System.Windows.Forms.ListBox -> System.Windows.Forms.ListBox.ObjectCollection
Public Sub New (owner As ListBox)

參數

owner
ListBox ListBox ListBox ListBox

擁有集合的 ListBoxThe ListBox that owns the collection.

備註

您無法建立此類別的執行個體,而不將它與ListBox控制項。You cannot create an instance of this class without associating it with a ListBox control.

ListBox.ObjectCollection(ListBox, Object[]) ListBox.ObjectCollection(ListBox, Object[]) ListBox.ObjectCollection(ListBox, Object[]) ListBox.ObjectCollection(ListBox, Object[])

初始化 ListBox.ObjectCollection 的新執行個體,這個執行個體含有物件陣列。Initializes a new instance of ListBox.ObjectCollection containing an array of objects.

public:
 ObjectCollection(System::Windows::Forms::ListBox ^ owner, cli::array <System::Object ^> ^ value);
public ObjectCollection (System.Windows.Forms.ListBox owner, object[] value);
new System.Windows.Forms.ListBox.ObjectCollection : System.Windows.Forms.ListBox * obj[] -> System.Windows.Forms.ListBox.ObjectCollection
Public Sub New (owner As ListBox, value As Object())

參數

owner
ListBox ListBox ListBox ListBox

擁有集合的 ListBoxThe ListBox that owns the collection.

value
Object[]

要加入至集合的物件陣列。An array of objects to add to the collection.

備註

您無法建立此類別的執行個體,而不將它與ListBox控制項。You cannot create an instance of this class without associating it with a ListBox control.

ListBox.ObjectCollection(ListBox, ListBox+ObjectCollection) ListBox.ObjectCollection(ListBox, ListBox+ObjectCollection) ListBox.ObjectCollection(ListBox, ListBox+ObjectCollection) ListBox.ObjectCollection(ListBox, ListBox+ObjectCollection)

初始化 ListBox.ObjectCollection 的新執行個體,這個執行個體以其他 ListBox.ObjectCollection 為基礎。Initializes a new instance of ListBox.ObjectCollection based on another ListBox.ObjectCollection.

public:
 ObjectCollection(System::Windows::Forms::ListBox ^ owner, System::Windows::Forms::ListBox::ObjectCollection ^ value);
public ObjectCollection (System.Windows.Forms.ListBox owner, System.Windows.Forms.ListBox.ObjectCollection value);
new System.Windows.Forms.ListBox.ObjectCollection : System.Windows.Forms.ListBox * System.Windows.Forms.ListBox.ObjectCollection -> System.Windows.Forms.ListBox.ObjectCollection
Public Sub New (owner As ListBox, value As ListBox.ObjectCollection)

參數

owner
ListBox ListBox ListBox ListBox

擁有集合的 ListBoxThe ListBox that owns the collection.

value
ListBox.ObjectCollection ListBox.ObjectCollection ListBox.ObjectCollection ListBox.ObjectCollection

ListBox.ObjectCollection,其內容將複製到這個集合中。A ListBox.ObjectCollection from which the contents are copied to this collection.

備註

您無法建立此類別的執行個體,而不將它與ListBox控制項。You cannot create an instance of this class without associating it with a ListBox control. 這個版本的建構函式可讓您使用現有的執行個體中指定的項目ListBox.ObjectCollection類別來建立時,項目加入至集合。This version of the constructor enables you to use the items specified in an existing instance of the ListBox.ObjectCollection class to add items to the collection when it is created. 您可以使用這個建構函式來使用在另一個指定的項目ListBox與此集合的控制項。You can use this constructor to use the items specified in another ListBox control with this collection.

適用於