ConfigurationSectionCollection.GetKey(Int32) 메서드

정의

ConfigurationSection 개체에 포함된 지정된 ConfigurationSectionCollection 개체의 키를 가져옵니다.

public:
 System::String ^ GetKey(int index);
public string GetKey(int index);
member this.GetKey : int -> string
Public Function GetKey (index As Integer) As String

매개 변수

index
Int32

키를 반환할 개체의 ConfigurationSection 인덱스입니다.

반품

지정된 인덱스의 ConfigurationSection 개체 키입니다.

예제

다음 코드 예제에서는 사용 GetKey하는 방법을 보여 있습니다.

int i = 0;
while (secEnum.MoveNext())
{
    string setionName = sections.GetKey(i);
    Console.WriteLine(
        "Section name: {0}", setionName);
    i += 1;
}
Dim i As Integer = 0
While secEnum.MoveNext()
    Dim setionName _
    As String = sections.GetKey(i)
    Console.WriteLine( _
    "Section name: {0}", setionName)
    i += 1
End While

적용 대상

추가 정보