ConfigurationSectionGroupCollection.GetKey(Int32) Methode

Definitie

Hiermee haalt u de sleutel op van het opgegeven ConfigurationSectionGroup object dat in dit ConfigurationSectionGroupCollection object is opgenomen.

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

Parameters

index
Int32

De index van de sectiegroep waarvan de sleutel moet worden geretourneerd.

Retouren

De sleutel van het ConfigurationSectionGroup object op de opgegeven index.

Voorbeelden

In het volgende codevoorbeeld ziet u hoe u de GetKey methode gebruikt.

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

Van toepassing op

Zie ook