|
ExtensionMethodsGetDefaultValue Method
|
Gets the default value for a type. This method should serve as
a programmatic equivalent to default(T).
Namespace:
Accord
Assembly:
Accord (in Accord.dll) Version: 3.8.0
Syntax public static Object GetDefaultValue(
this Type type
)
<ExtensionAttribute>
Public Shared Function GetDefaultValue (
type As Type
) As Object
Request Example
View SourceParameters
- type
- Type: SystemType
The type whose default value should be retrieved.
Return Value
Type:
ObjectUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Type. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also