ObjectContent<T> Constructor (T, MediaTypeFormatter)

Initializes a new instance of the ObjectContent<T> class.

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

Syntax

'Declaration
Public Sub New ( _
    value As T, _
    formatter As MediaTypeFormatter _
)
'Usage
Dim value As T
Dim formatter As MediaTypeFormatter 

Dim instance As New ObjectContent(value, formatter)
public ObjectContent(
    T value,
    MediaTypeFormatter formatter
)
public:
ObjectContent(
    T value, 
    MediaTypeFormatter^ formatter
)
new : 
        value:'T * 
        formatter:MediaTypeFormatter -> ObjectContent
public function ObjectContent(
    value : T, 
    formatter : MediaTypeFormatter
)

Parameters

  • value
    Type: T
    The value of the object this instance will contain.

See Also

Reference

ObjectContent<T> Class

ObjectContent<T> Overload

System.Net.Http Namespace