Click or drag to resize
Accord.NET (logo)

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
)
Request Example View Source

Parameters

type
Type: SystemType
The type whose default value should be retrieved.

Return Value

Type: Object

Usage 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