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
Collabora con noi su GitHub
L'origine di questo contenuto è disponibile in GitHub, in cui è anche possibile creare ed esaminare i problemi e le richieste pull. Per ulteriori informazioni, vedere la guida per i collaboratori.