ConfigurationSectionGroupCollection.GetKey(Int32) Metoda

Definicja

Pobiera klucz określonego ConfigurationSectionGroup obiektu zawartego w tym ConfigurationSectionGroupCollection obiekcie.

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

Parametry

index
Int32

Indeks grupy sekcji, której klucz ma zostać zwrócony.

Zwraca

Klucz ConfigurationSectionGroup obiektu w określonym indeksie.

Przykłady

W poniższym przykładzie kodu pokazano, jak używać GetKey metody .

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

Dotyczy

Zobacz też