TextMessageEncodingBindingElement Constructor (MessageVersion, Encoding)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the TextMessageEncodingBindingElement class with a specified message version and encoding.

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

public TextMessageEncodingBindingElement(
	MessageVersion messageVersion,
	Encoding writeEncoding
)

Parameters

messageVersion
Type: System.ServiceModel.Channels.MessageVersion

The MessageVersion that is used for the message version.

writeEncoding
Type: System.Text.Encoding

The Encoding that is used to format the message characters.

Exception Condition
ArgumentNullException

messageVersion or writeEncoding is null.

ArgumentException

writeEncoding value is not valid.

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: