DesignerVerbCollection.Contains(DesignerVerb) 메서드

정의

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

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

적용 대상