Share via


ObjectContent Constructor (Type, Object, MediaTypeFormatter)

Initializes a new instance of the ObjectContent class.

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

Syntax

'Declaration
Public Sub New ( _
    type As Type, _
    value As Object, _
    formatter As MediaTypeFormatter _
)
'Usage
Dim type As Type 
Dim value As Object 
Dim formatter As MediaTypeFormatter 

Dim instance As New ObjectContent(type, value, _
    formatter)
public ObjectContent(
    Type type,
    Object value,
    MediaTypeFormatter formatter
)
public:
ObjectContent(
    Type^ type, 
    Object^ value, 
    MediaTypeFormatter^ formatter
)
new : 
        type:Type * 
        value:Object * 
        formatter:MediaTypeFormatter -> ObjectContent
public function ObjectContent(
    type : Type, 
    value : Object, 
    formatter : MediaTypeFormatter
)

Parameters

  • type
    Type: System.Type

    The type of object this instance will contain.

  • value
    Type: System.Object

    The value of the object this instance will contain.

See Also

Reference

ObjectContent Class

ObjectContent Overload

System.Net.Http Namespace