次の方法で共有


DesignerVerbCollection.Contains メソッド

指定した DesignerVerb がコレクション内に存在するかどうかを示す値を取得します。

名前空間: System.ComponentModel.Design
アセンブリ: System (system.dll 内)

構文

'宣言
Public Function Contains ( _
    value As DesignerVerb _
) As Boolean
'使用
Dim instance As DesignerVerbCollection
Dim value As DesignerVerb
Dim returnValue As Boolean

returnValue = instance.Contains(value)
public bool Contains (
    DesignerVerb value
)
public:
bool Contains (
    DesignerVerb^ value
)
public boolean Contains (
    DesignerVerb value
)
public function Contains (
    value : DesignerVerb
) : boolean

パラメータ

  • value
    コレクション内で検索される DesignerVerb

戻り値

指定したオブジェクトがコレクション内に存在する場合は true。それ以外の場合は false

使用例

' Tests for the presence of a DesignerVerb in the collection, 
' and retrieves its index if it is found.
Dim testVerb As New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent))
Dim itemIndex As Integer = -1
If collection.Contains(testVerb) Then
    itemIndex = collection.IndexOf(testVerb)
End If
// Tests for the presence of a DesignerVerb in the collection, 
// and retrieves its index if it is found.
DesignerVerb testVerb = new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent));
int itemIndex = -1;
if( collection.Contains( testVerb ) )
    itemIndex = collection.IndexOf( testVerb );
// Tests for the presence of a DesignerVerb in the collection,
// and retrieves its index if it is found.
DesignerVerb^ testVerb = gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) );
int itemIndex = -1;
if ( collection->Contains( testVerb ) )
         itemIndex = collection->IndexOf( testVerb );

プラットフォーム

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 2.0、1.1、1.0

参照

関連項目

DesignerVerbCollection クラス
DesignerVerbCollection メンバ
System.ComponentModel.Design 名前空間