ControlCollection.Contains メソッド
アセンブリ: System.Web (system.web.dll 内)

Dim instance As ControlCollection Dim c As Control Dim returnValue As Boolean returnValue = instance.Contains(c)
- c
コレクション内で検索されるサーバー コントロール。
指定されたサーバー コントロールがコレクションにある場合は true。それ以外の場合は false。

' Create an event handler that uses the ' ControlCollection.Contains method to verify ' the existence of a Radio3 server control in ' the ControlCollection of the myForm server control. ' When a user clicks the button associated ' with this event handler, Radio3 is removed ' from the collection. Sub RemoveBtn_Click(sender As [Object], e As EventArgs) If myForm.Controls.Contains(Radio3) Then myForm.Controls.Remove(Radio3) End If End Sub 'RemoveBtn_Click
// Create an event handler that uses the // ControlCollection.Contains method to verify // the existence of a Radio3 server control in // the ControlCollection of the myForm server control. // When a user clicks the button associated // with this event handler, Radio3 is removed // from the collection. void RemoveBtn_Click(Object sender, EventArgs e){ if (myForm.Controls.Contains(Radio3)) { myForm.Controls.Remove(Radio3); } }
// Create an event handler that uses the // ControlCollection.Contains method to verify // the existence of a Radio3 server control in // the ControlCollection of the myForm server control. // When a user clicks the button associated // with this event handler, Radio3 is removed // from the collection. void RemoveBtn_Click(Object sender, EventArgs e) { if (myForm.get_Controls().Contains(Radio3)) { myForm.get_Controls().Remove(Radio3); } } //RemoveBtn_Click

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に収録されているすべての辞書からControlCollection.Contains メソッドを検索する場合は、下記のリンクをクリックしてください。

- ControlCollection.Contains メソッドのページへのリンク