CodeTypeReferenceCollection.Contains(CodeTypeReference) 메서드

정의

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

public:
 bool Contains(System::CodeDom::CodeTypeReference ^ value);
public bool Contains(System.CodeDom.CodeTypeReference value);
member this.Contains : System.CodeDom.CodeTypeReference -> bool
Public Function Contains (value As CodeTypeReference) As Boolean

매개 변수

value
CodeTypeReference

CodeTypeReference 컬렉션에서 검색할 대상입니다.

반품

true 컬렉션에 포함되어 있으면 CodeTypeReference 이고, false그렇지 않으면 .입니다.

예제

// Tests for the presence of a CodeTypeReference in the
// collection, and retrieves its index if it is found.
CodeTypeReference testReference = new CodeTypeReference(typeof(bool));
int itemIndex = -1;
if( collection.Contains( testReference ) )
    itemIndex = collection.IndexOf( testReference );
' Tests for the presence of a CodeTypeReference in the 
' collection, and retrieves its index if it is found.
Dim testReference As New CodeTypeReference(GetType(Boolean))
Dim itemIndex As Integer = -1
If collection.Contains(testReference) Then
    itemIndex = collection.IndexOf(testReference)
End If

적용 대상

추가 정보