BindingCollection.Item[] 속성

정의

전달된 매개 변수에서 지정한 Binding 인스턴스를 가져오거나 설정합니다.

오버로드

Item[Int32]

지정된 인덱스(0부터 시작)에서 Binding의 값을 가져오거나 설정합니다.

Item[String]

이름으로 지정된 Binding를 가져옵니다.

Item[Int32]

지정된 인덱스(0부터 시작)에서 Binding의 값을 가져오거나 설정합니다.

public:
 property System::Web::Services::Description::Binding ^ default[int] { System::Web::Services::Description::Binding ^ get(int index); void set(int index, System::Web::Services::Description::Binding ^ value); };
public System.Web.Services.Description.Binding this[int index] { get; set; }
member this.Item(int) : System.Web.Services.Description.Binding with get, set
Default Public Property Item(index As Integer) As Binding

매개 변수

index
Int32

값이 수정되거나 반환된 Binding의 인덱스이며 0부터 시작합니다.

속성 값

Binding

Binding

예외

index 매개 변수가 0보다 작습니다.

또는 index 매개 변수가 Count보다 큰 경우

예제

for ( int i = 0; i < myServiceDescription->Bindings->Count; ++i )
{
   Console::WriteLine( "\nBinding {0}", i );

   // Get Binding at index i.
   myBinding = myServiceDescription->Bindings[ i ];
   Console::WriteLine( "\t Name : {0}", myBinding->Name );
   Console::WriteLine( "\t Type : {0}", myBinding->Type );
}
 for(int i=0; i < myServiceDescription.Bindings.Count; ++i)
  {	
     Console.WriteLine("\nBinding " + i );
      // Get Binding at index i.
    myBinding = myServiceDescription.Bindings[i];
      Console.WriteLine("\t Name : " + myBinding.Name);
      Console.WriteLine("\t Type : " + myBinding.Type);
}
Dim i As Integer

While i < myServiceDescription.Bindings.Count
   Console.WriteLine((ControlChars.Cr + "Binding " + i.ToString()))
   ' Get Binding at index i.
   myBinding = myServiceDescription.Bindings(i)
   Console.WriteLine((ControlChars.Tab + " Name : " + myBinding.Name))
   Console.WriteLine((ControlChars.Tab + " Type : " + myBinding.Type.ToString()))
   i = i + 1
End While

적용 대상

Item[String]

이름으로 지정된 Binding를 가져옵니다.

public:
 property System::Web::Services::Description::Binding ^ default[System::String ^] { System::Web::Services::Description::Binding ^ get(System::String ^ name); };
public System.Web.Services.Description.Binding this[string name] { get; }
member this.Item(string) : System.Web.Services.Description.Binding
Default Public ReadOnly Property Item(name As String) As Binding

매개 변수

name
String

반환된 Binding 이름입니다.

속성 값

Binding

Binding

예제

다음 예제에서는 검색 합니다 Bindings myServiceDescription에 대 한 속성을 Binding "MathServiceHttpGet" 라는 합니다.

// Get Binding Name = S"MathServiceSoap".
myBinding = myServiceDescription->Bindings[ "MathServiceHttpGet" ];
if ( myBinding != nullptr )
{
   Console::WriteLine( "\n\nName : {0}", myBinding->Name );
   Console::WriteLine( "Type : {0}", myBinding->Type );
}
// Get Binding Name = "MathServiceSoap".
myBinding = myServiceDescription.Bindings["MathServiceHttpGet"];
if (myBinding != null)
{
   Console.WriteLine("\n\nName : " + myBinding.Name);
   Console.WriteLine("Type : " + myBinding.Type);
}
' Get Binding Name = "MathServiceSoap".
myBinding = myServiceDescription.Bindings("MathServiceHttpGet")
If Not (myBinding Is Nothing) Then
   Console.WriteLine((ControlChars.Cr + ControlChars.Cr + "Name : " + myBinding.Name))
   Console.WriteLine(("Type : " + myBinding.Type.ToString()))
End If

적용 대상