Redigera

Dela via


TextMessageEncodingElement.WriteEncoding Property

Definition

Gets or sets the character set encoding to be used for emitting messages on the binding.

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

Property Value

A valid Encoding value that specifies the character set encoding to be used for emitting messages on the binding. The default is UTF8Encoding.

Attributes

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