CodeParameterDeclarationExpressionCollection.IndexOf 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
컬렉션에 있는 경우 지정된 CodeParameterDeclarationExpression컬렉션의 인덱스를 가져옵니다.
public:
int IndexOf(System::CodeDom::CodeParameterDeclarationExpression ^ value);
public int IndexOf(System.CodeDom.CodeParameterDeclarationExpression value);
member this.IndexOf : System.CodeDom.CodeParameterDeclarationExpression -> int
Public Function IndexOf (value As CodeParameterDeclarationExpression) As Integer
매개 변수
CodeParameterDeclarationExpression 컬렉션에서 찾을 위치입니다.
반품
지정된 개체의 컬렉션에 있는 인덱스입니다(있는 경우). 그렇지 않으면 -1입니다.
예제
다음 예제에서는 특정 CodeParameterDeclarationExpression 인스턴스의 존재를 검색하고 메서드를 IndexOf 사용하여 발견된 인덱스 값을 가져옵니다.
// 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