ListItemCollection.Count Özellik

Tanım

Koleksiyondaki nesne sayısını ListItem alır.

public:
 property int Count { int get(); };
public int Count { get; }
member this.Count : int
Public ReadOnly Property Count As Integer

Özellik Değeri

Int32

Koleksiyondaki nesne sayısı ListItem .

Uygulamalar

Örnekler

Tam olarak çalışan bir örnekte aşağıdaki kodu görüntülemek için sınıf konusuna ListItemCollection bakın.

// Set the number of rows displayed in the ListBox to be
// the number of items in the ListBoxCollection.
ListBox1.Rows = ListBox1.Items.Count;
' Set the number of rows displayed in the ListBox to be
' the number of items in the ListBoxCollection.
ListBox1.Rows = ListBox1.Items.Count

Açıklamalar

Count içindeki nesne ListItemCollectionsayısını ListItem belirlemek için özelliğini kullanın. Count özelliği genellikle koleksiyonun üst sınırlarını belirlemek için koleksiyonda yinelenirken kullanılır.

Şunlara uygulanır

Ayrıca bkz.