Share via


MediaTypeFormatter.GetDefaultValueForType Method

Gets the default value for the specified type.

Namespace:  System.Net.Http.Formatting
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

Syntax

'Declaration
Public Shared Function GetDefaultValueForType ( _
    type As Type _
) As Object
'Usage
Dim type As Type 
Dim returnValue As Object 

returnValue = MediaTypeFormatter.GetDefaultValueForType(type)
public static Object GetDefaultValueForType(
    Type type
)
public:
static Object^ GetDefaultValueForType(
    Type^ type
)
static member GetDefaultValueForType : 
        type:Type -> Object
public static function GetDefaultValueForType(
    type : Type
) : Object

Parameters

  • type
    Type: System.Type

    The type for which to get the default value.

Return Value

Type: System.Object
The default value.

See Also

Reference

MediaTypeFormatter Class

System.Net.Http.Formatting Namespace