Share via


ListItemCollection.Count 속성

정의

컬렉션에 있는 ListItem 개체의 수를 가져옵니다.

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

속성 값

Int32

컬렉션의 ListItem 개체 수입니다.

구현

예제

완전히 작동하는 예제에서 다음 코드를 보려면 클래스 항목을 참조 ListItemCollection 하세요.

// 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

설명

속성을 ListItem ListItemCollection사용하여 .Count Count 속성은 컬렉션의 상위를 확인 하려면 컬렉션을 반복할 때 일반적으로 사용 됩니다.

적용 대상

추가 정보