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

적용 대상

추가 정보