TextMessageEncodingBindingElement::WriteEncoding Property

 

Gets or sets the encoding that is used to format the characters in the text message.

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

public:
property Encoding^ WriteEncoding {
	Encoding^ get();
	void set(Encoding^ value);
}

Property Value

Type: System.Text::Encoding^

The Encoding that is used to format the characters in the text message. The default text encoding is the UTF-8 format.

Exception Condition
ArgumentNullException

The value is null.

ArgumentException

writeEncoding value is not valid.

When specifying a content type such as “utf-16” an XML declaration is required in the message. Alternatively you can specify either “utf-16LE” or “utf-16BE” and an XML declaration is not required.

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: