RepeaterItemCollection.Count プロパティ
アセンブリ: System.Web (system.web.dll 内)

コレクション内の DataListItem オブジェクトの数。

Count プロパティを使用して、RepeaterItemCollection コレクション内の RepeaterItem オブジェクトの数を確認します。通常、Count プロパティは、コレクションを反復処理してコレクションの上限を確認する場合に使用されます。

このコード例の全体像については、RepeaterItemCollection クラスのトピックを参照してください。
Sub Item_Clicked(Sender As [Object], e As EventArgs) labelDisplay.Text = "Using item indexer.<br>" labelDisplay.Text += "The Items collection contains: <br>" ' Display the elements of the RepeaterItemCollection using the indexer. Dim myItemCollection As RepeaterItemCollection = myRepeater.Items Dim index As Integer For index = 0 To myItemCollection.Count - 1 labelDisplay.Text += CType(myItemCollection(index).Controls(0), DataBoundLiteralControl).Text + "<br>" Next index End Sub 'Item_Clicked
void Item_Clicked(Object Sender, EventArgs e) { labelDisplay.Text = "Using item indexer.<br>"; labelDisplay.Text += "The Items collection contains: <br>"; // Display the elements of the RepeaterItemCollection using the indexer. RepeaterItemCollection myItemCollection = myRepeater.Items; for(int index=0;index < myItemCollection.Count;index++) labelDisplay.Text += ((DataBoundLiteralControl) myItemCollection[index].Controls[0]).Text + "<br>"; }

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からRepeaterItemCollection.Count プロパティを検索する場合は、下記のリンクをクリックしてください。

- RepeaterItemCollection.Count プロパティのページへのリンク