ContentType Property
Collapse the table of content
Expand the table of content

MessageEncoder.ContentType Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

When overridden in a derived class, gets the MIME content type used by the encoder.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

'Declaration
Public MustOverride ReadOnly Property ContentType As String

Property Value

Type: System.String
The content type that is supported by the message encoder.

The content type is a Multipurpose Internet Mail Exchange (MIME) header that appears at the beginning of a MIME message as well as within the separate body parts. Content-type headers are used to specify the media type and subtype of data in the body of a message and to fully specify the media type and subtype of data in the body of a message and to specify the character encoding (optional) of the data. An example of a MIME content type that can be supported: “application/soap+xml; charset=’utf8’”.

A grammar that details the syntax of the content-type header is described in RFC 2045, Section 5.1. RFC 2046 provides detailed information about MIME media types and their parameters.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft