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)

public ObjectContent(
	T value,
	MediaTypeFormatter formatter
)

Parameters

value
Type: T
The value of the object this instance will contain.
formatter
Type: System.Net.Http.Formatting.MediaTypeFormatter
The formatter to use when serializing the value.
Show: