Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ReflectionUtils.GetDefaultValue Method

Returns the default value for the specified Type

[Visual Basic]
Public Shared Sub GetDefaultValue( _
   ByVal type As Type _
public static object GetDefaultValue(
   Type type


The Type to return default value for.

Return Value

The default value for the specified Type.


Follows the standard .NET conventions for default values where relevant; for example, all numeric types default to the value 0.


Exception Type Condition
ArgumentException If the supplied type is an enumerated type that has no values.

See Also

ReflectionUtils Class | Spring.Util Namespace