コレクションが指定した ToolboxItem を格納しているかどうかを示します。
Public Function Contains( _
ByVal value As ToolboxItem _) As Boolean
[C#]
public bool Contains(ToolboxItemvalue);
[C++]
public: bool Contains(ToolboxItem* value);
[JScript]
public function Contains(
value : ToolboxItem) : Boolean;
パラメータ
- value
コレクションで検索する ToolboxItem 。
戻り値
コレクションに指定したオブジェクトが格納されている場合は true 。それ以外の場合は false 。
使用例
[Visual Basic, C#, C++] ToolboxItemCollection の Contains メソッドの使用例を次に示します。
' If the collection contains the specified ToolboxItem,
' retrieve the collection index of the specified item.
Dim indx As Integer = -1
If collection.Contains(item) Then
indx = collection.IndexOf(item)
End If
[C#]
// If the collection contains the specified ToolboxItem,
// retrieve the collection index of the specified item.
int indx = -1;
if( collection.Contains( item ) )
indx = collection.IndexOf( item );
[C++]
// If the collection contains the specified ToolboxItem,
// retrieve the collection index of the specified item.
int indx = -1;
if( collection->Contains( item ) )
indx = collection->IndexOf( item );
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン
をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
ToolboxItemCollection クラス | ToolboxItemCollection メンバ | System.Drawing.Design 名前空間