ConfigurationProperty.DefaultValue Property


This API supports the product infrastructure and is not intended to be used directly from your code.

Gets the default value for this ConfigurationProperty property.

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

public object DefaultValue { get; }

Property Value

Type: System.Object

An Object that can be cast to the type specified by the Type property.

The default value of a new ConfigurationProperty object is passed into its constructor. That same object will be returned by the DefaultValue property.

The following code example shows how to get the DefaultValue for a specified property.

string defaultValue = _MaxIdleTime.DefaultValue.ToString();
Console.WriteLine("MaxIdleTime default value: {0}",

.NET Framework
Available since 2.0
Return to top