This documentation is archived and is not being maintained.

MessageEncodingBindingElement.MessageVersion Property

When overridden in a derived class, gets or sets the message version that can be handled by the message encoders produced by the message encoder factory.

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

public abstract MessageVersion MessageVersion { get; set; }
/** @property */
public abstract MessageVersion get_MessageVersion ()

/** @property */
public abstract void set_MessageVersion (MessageVersion value)

public abstract function get MessageVersion () : MessageVersion

public abstract function set MessageVersion (value : MessageVersion)

Not applicable.

Property Value

The MessageVersion used by the encoders produced by the message encoder factory.

When binding elements are asked to process a message that has a MessageVersion not returned by this property, it should throw an exception.

The following code illustrates how to implement the MessageVersion property:

public override MessageVersion MessageVersion
{
    get
    {
        return this.msgVersion;
    }

    set
    {
        if (value == null)
            throw new ArgumentNullException("value");
        this.msgVersion = value;
    }
}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: