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입니다.

반환

컬렉션에 지정한 개체가 포함되어 있으면 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

적용 대상