Edit

Share via


TextMessageEncodingBindingElement.WriteEncoding Property

Definition

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

public:
 property System::Text::Encoding ^ WriteEncoding { System::Text::Encoding ^ get(); void set(System::Text::Encoding ^ value); };
public System.Text.Encoding WriteEncoding { get; set; }
[System.ComponentModel.TypeConverter(typeof(System.ServiceModel.Configuration.EncodingConverter))]
public System.Text.Encoding WriteEncoding { get; set; }
member this.WriteEncoding : System.Text.Encoding with get, set
[<System.ComponentModel.TypeConverter(typeof(System.ServiceModel.Configuration.EncodingConverter))>]
member this.WriteEncoding : System.Text.Encoding with get, set
Public Property WriteEncoding As Encoding

Property Value

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

Attributes

Exceptions

The value is null.

writeEncoding value is not valid.

Remarks

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.

Applies to