MessageEncoder.ContentType Property
Microsoft Silverlight will reach end of support after October 2021. Learn more.
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)
Syntax
'Declaration
Public MustOverride ReadOnly Property ContentType As String
public abstract string ContentType { get; }
Property Value
Type: System.String
The content type that is supported by the message encoder.
Remarks
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.
Version Information
Silverlight
Supported in: 5, 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
XNA Framework
Supported in: Windows Phone OS 7.0
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.