DesignerVerbCollection.Contains(DesignerVerb) 메서드

정의

지정된 DesignerVerb가 컬렉션에 있는지 여부를 나타내는 값을 가져옵니다.

public:
 bool Contains(System::ComponentModel::Design::DesignerVerb ^ value);
public bool Contains (System.ComponentModel.Design.DesignerVerb value);
public bool Contains (System.ComponentModel.Design.DesignerVerb? value);
member this.Contains : System.ComponentModel.Design.DesignerVerb -> bool
Public Function Contains (value As DesignerVerb) As Boolean

매개 변수

value
DesignerVerb

컬렉션에서 검색할 DesignerVerb입니다.

반환

지정된 개체가 컬렉션에 있으면 true이고, 그렇지 않으면 false입니다.

예제

다음 예제에서는 메서드를 Contains 사용 하 여 특정 DesignerVerb 개체의 존재를 검색 하 고 이후에 발견 된 인덱스 값을 검색 합니다.

// 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 );
// 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.
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

적용 대상