OperationCollection.IndexOf(Operation) 메서드

정의

지정된 Operation 인덱스(0부터 시작)를 검색하여 컬렉션 내에서 처음 발생한 인덱스(0부터 시작)를 반환합니다.

public:
 int IndexOf(System::Web::Services::Description::Operation ^ operation);
public int IndexOf(System.Web.Services.Description.Operation operation);
member this.IndexOf : System.Web.Services.Description.Operation -> int
Public Function IndexOf (operation As Operation) As Integer

매개 변수

operation
Operation

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

반품

부가된 32비트 정수입니다.

예제

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

if ( myOperationCollection->Contains( myOperation ))
{
   Console::WriteLine( "The index of the added 'myOperation' operation is : {0}", myOperationCollection->IndexOf( myOperation ) );
}
if (myOperationCollection.Contains(myOperation))
{
   Console.WriteLine("The index of the added 'myOperation' " +
                     "operation is : " +
                     myOperationCollection.IndexOf(myOperation));
}
If myOperationCollection.Contains(myOperation) = True Then
   Console.WriteLine("The index of the added 'myOperation' " + _
            "operation is : " + _
            myOperationCollection.IndexOf(myOperation).ToString)
End If

적용 대상