ListView.SelectedListViewItemCollection.Count 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得集合中的項目數目。
public:
property int Count { int get(); };
[System.ComponentModel.Browsable(false)]
public int Count { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Count : int
Public ReadOnly Property Count As Integer
屬性值
收藏品數量。
實作
- 屬性
備註
此特性使您能判斷控制中選取 ListView 項目的數量。 你可以用這個值來迴圈集合的值,並且需要提供多次迭代來執行迴圈。 除非 MultiSelect 的 ListView 屬性被設定為 true,否則這個屬性總是回傳零(0)或一(1),取決於你是否選擇了某個項目。