다음을 통해 공유


OperationCollection.IndexOf(Operation) 메서드

정의

컬렉션에서 지정된 Operation을 검색하여 처음 나오는 항목의 인덱스(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입니다.

반환

Int32

32비트 부호 있는 정수입니다.

예제

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

if ( myOperationCollection->Contains( myOperation ) == true )
{
   Console::WriteLine( "The index of the added 'myOperation' operation is : {0}", myOperationCollection->IndexOf( myOperation ) );
}
if(myOperationCollection.Contains(myOperation) == true)
{
   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

적용 대상