ConfigurationSectionCollection.GetKey(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the key of the specified ConfigurationSection object contained in this ConfigurationSectionCollection object.
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
The index of the ConfigurationSection object whose key is to be returned.
Returns
The key of the ConfigurationSection object at the specified index.
Examples
The following code example shows how to use 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
Applies to
See also
Collaborer avec nous sur GitHub
La source de ce contenu se trouve sur GitHub, où vous pouvez également créer et examiner les problèmes et les demandes de tirage. Pour plus d’informations, consultez notre guide du contributeur.