ToolboxItemCollection.Contains(ToolboxItem) 메서드

정의

컬렉션에 지정된 ToolboxItem항목이 포함되어 있는지 여부를 나타냅니다.

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

매개 변수

value
ToolboxItem

ToolboxItem 컬렉션을 검색할 A입니다.

반품

true컬렉션에 지정된 개체가 포함되어 있으면 이고, 그렇지 않으면 . false

예제

다음 코드 예제에서는 .의 메서드를 Contains 사용하는 방법을 ToolboxItemCollection보여 줍니다.

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

적용 대상