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
Col·laboreu amb nosaltres a GitHub
La font d'aquest contingut es pot trobar al GitHub, on també podeu crear i revisar problemes i sol·licituds d'extracció. Per obtenir més informació, consulteu la nostra guia per a col·laboradors.