Share via


XmlMediaTypeFormatter.DefaultMediaType Property

Gets the default media type for the XML formatter.

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

Syntax

'Declaration
Public Shared ReadOnly Property DefaultMediaType As MediaTypeHeaderValue
    Get
'Usage
Dim value As MediaTypeHeaderValue

value = XmlMediaTypeFormatter.DefaultMediaType
public static MediaTypeHeaderValue DefaultMediaType { get; }
public:
static property MediaTypeHeaderValue^ DefaultMediaType {
    MediaTypeHeaderValue^ get ();
}
static member DefaultMediaType : MediaTypeHeaderValue
static function get DefaultMediaType () : MediaTypeHeaderValue

Property Value

Type: MediaTypeHeaderValue
The default media type, which is “application/xml”.

See Also

Reference

XmlMediaTypeFormatter Class

System.Net.Http.Formatting Namespace