Condividi tramite


KeyValueConfigurationElement.Value Proprietà

Definizione

Ottiene o imposta il valore dell'oggetto KeyValueConfigurationElement .

public:
 property System::String ^ Value { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("value", DefaultValue="")]
public string Value { get; set; }
public string Value { get; set; }
[<System.Configuration.ConfigurationProperty("value", DefaultValue="")>]
member this.Value : string with get, set
member this.Value : string with get, set
Public Property Value As String

Valore della proprietà

Valore di KeyValueConfigurationElement.

Attributi

Esempio

Nell'esempio di codice seguente viene illustrato come utilizzare la Value proprietà . Questo esempio di codice fa parte di un esempio più ampio fornito per la panoramica della KeyValueConfigurationCollection classe.

// Display each KeyValueConfigurationElement.
foreach (KeyValueConfigurationElement keyValueElement in settings)
{
  Console.WriteLine("Key: {0}", keyValueElement.Key);
  Console.WriteLine("Value: {0}", keyValueElement.Value);
  Console.WriteLine();
}
' Display each KeyValueConfigurationElement.
Dim keyValueElement As KeyValueConfigurationElement
For Each keyValueElement In settings
  Console.WriteLine("Key: {0}", keyValueElement.Key)
  Console.WriteLine("Value: {0}", keyValueElement.Value)
  Console.WriteLine()
Next

Si applica a