다음을 통해 공유


OperationBindingCollection.IndexOf(OperationBinding) 메서드

정의

컬렉션에서 지정된 OperationBinding을 검색하여 처음 나오는 항목의 인덱스(0부터 시작)를 반환합니다.

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

매개 변수

bindingOperation
OperationBinding

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

반환

Int32

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

예제

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

// Insert the OperationBinding of the Add operation at index 0.
myOperationBindingCollection->Insert( 0, addOperationBinding );
Console::WriteLine( "\nInserted the OperationBinding of the "
"Add operation in the collection." );

// Get the index of the OperationBinding of the Add
// operation from the collection.
int index = myOperationBindingCollection->IndexOf( addOperationBinding );
Console::WriteLine( "\nThe index of the OperationBinding of the Add operation : {0}", index );
// Insert the OperationBinding of the Add operation at index 0.
myOperationBindingCollection.Insert(0, addOperationBinding);
Console.WriteLine("\nInserted the OperationBinding of the " +
   "Add operation in the collection.");

// Get the index of the OperationBinding of the Add
// operation from the collection.
int index = myOperationBindingCollection.IndexOf(addOperationBinding);
Console.WriteLine("\nThe index of the OperationBinding of the " +
   "Add operation : " + index);
' Insert the OperationBinding of the Add operation at index 0.
myOperationBindingCollection.Insert(0, addOperationBinding)
Console.WriteLine(ControlChars.NewLine & _
   "Inserted the OperationBinding of the " & _
   "Add operation in the collection.")

' Get the index of the OperationBinding of the Add
' operation from the collection.
Dim index As Integer = myOperationBindingCollection.IndexOf( _
   addOperationBinding)
Console.WriteLine(ControlChars.NewLine & _
   "The index of the OperationBinding of the " & _
   "Add operation : " & index.ToString())

적용 대상