ConfigurationSectionCollection.GetKey(Int32) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Obtém a chave do objeto especificado ConfigurationSection contido neste ConfigurationSectionCollection objeto.
public:
System::String ^ GetKey(int index);
public string GetKey(int index);
member this.GetKey : int -> string
Public Function GetKey (index As Integer) As String
Parâmetros
- index
- Int32
O índice do ConfigurationSection objeto cuja chave deve ser devolvida.
Devoluções
A chave do ConfigurationSection objeto no índice especificado.
Exemplos
O seguinte exemplo de código mostra como usar 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