Export (0) Print
Expand All

KeyValueConfigurationElement.Value Property

Gets or sets the value of the KeyValueConfigurationElement object.

Namespace:  System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

[ConfigurationPropertyAttribute("value", DefaultValue = "")]
public string Value { get; set; }

Property Value

Type: System.String
The value of the KeyValueConfigurationElement.

The following code example demonstrates how to use the Value property. This code example is part of a larger example provided for the KeyValueConfigurationCollection class overview.

// Display each KeyValueConfigurationElement. 
foreach (KeyValueConfigurationElement keyValueElement in settings)
{
  Console.WriteLine("Key: {0}", keyValueElement.Key);
  Console.WriteLine("Value: {0}", keyValueElement.Value);
  Console.WriteLine();
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft