CodeParameterDeclarationExpressionCollection.Contains 메서드

정의

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

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

매개 변수

value
CodeParameterDeclarationExpression

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

반품

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

예제

다음 예제에서는 메서드를 Contains 사용하여 특정 CodeParameterDeclarationExpression 개체의 존재를 검색하고 해당 개체가 발견된 인덱스 값을 가져옵니다.

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

적용 대상

추가 정보