Partager via


MediaTypeMapping.MediaType Property

Gets the MediaTypeHeaderValue that is associated with HttpRequestMessage or HttpResponseMessage instances that have the given characteristics of the MediaTypeMapping.

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

Syntax

'Declaration
Public Property MediaType As MediaTypeHeaderValue
    Get
    Private Set
'Usage
Dim instance As MediaTypeMapping
Dim value As MediaTypeHeaderValue

value = instance.MediaType
public MediaTypeHeaderValue MediaType { get; private set; }
public:
property MediaTypeHeaderValue^ MediaType {
    MediaTypeHeaderValue^ get ();
    private: void set (MediaTypeHeaderValue^ value);
}
member MediaType : MediaTypeHeaderValue with get, private set
function get MediaType () : MediaTypeHeaderValue
private function set MediaType (value : MediaTypeHeaderValue)

Property Value

Type: MediaTypeHeaderValue

See Also

Reference

MediaTypeMapping Class

System.Net.Http.Formatting Namespace