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: TThe value of the object this instance will contain.
formatter
Type: System.Net.Http.Formatting.MediaTypeFormatterThe formatter to use when serializing the value.