KeyValueConfigurationElement.Value Eigenschap

Definitie

Hiermee haalt u de waarde van het object op of stelt u deze KeyValueConfigurationElement in.

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

Waarde van eigenschap

De waarde van de KeyValueConfigurationElement.

Kenmerken

Voorbeelden

In het volgende codevoorbeeld ziet u hoe u de Value eigenschap gebruikt. Dit codevoorbeeld maakt deel uit van een groter voorbeeld voor het KeyValueConfigurationCollection klasseoverzicht.

// 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

Van toepassing op