ConfigurationSectionGroupCollection.GetKey(Int32) 메서드

정의

ConfigurationSectionGroup 개체에 있는 지정된 ConfigurationSectionGroupCollection 개체의 키를 가져옵니다.

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

반환될 키가 있는 섹션 그룹의 인덱스입니다.

반환

지정된 인덱스에 있는 ConfigurationSectionGroup 개체의 키입니다.

예제

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

int i = 0;
while (groupEnum.MoveNext())
{
    string groupName = groups.GetKey(i);
    Console.WriteLine(
        "Group name: {0}", groupName);
    i += 1;
}
Dim i As Integer = 0
While groupEnum.MoveNext()
   Dim groupName As String = groups.GetKey(i)
   Console.WriteLine("Group name: {0}", groupName)
   i += 1
End While

적용 대상

추가 정보