Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ParameterInfo.DefaultValue Property

Gets the default value, if the parameter has a default value.

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

public virtual Object DefaultValue { get; }

Property Value

Type: System.Object
The default value of the parameter, or Value if the parameter has no default value.

The default value is used when an actual value is not specified in the method call. A parameter can have a default value that is null. This is distinct from the case where a default value is not defined.

To get the ParameterInfo array, first get the method or the constructor, and then call MethodBase.GetParameters.

Platform Notes

Silverlight for Windows Phone Silverlight for Windows Phone

 DefaultValue returns null in Silverlight for Windows Phone.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

Show:
© 2014 Microsoft