ParameterInfo.DefaultValue Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

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


Public Overridable ReadOnly Property DefaultValue As Object
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 nullNothingnullptra null reference (Nothing in Visual Basic). 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.

Version Notes

Windows Phone

DefaultValue returns null in Windows Phone.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0


Windows Phone

See Also


ParameterInfo Class

System.Reflection Namespace