Export (0) Print
Expand All

Message.Extension Property

Gets or sets additional, application-defined information associated with the message.

Namespace:  System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)

[MessagingDescriptionAttribute("MsgExtension")]
public byte[] Extension { get; set; }

Property Value

Type: System.Byte[]
An array of byte values that provides application-defined information associated with the message. The default is a zero-length array.

ExceptionCondition
InvalidOperationException

The message queue is filtered to ignore the Extension property.

ArgumentException

The Extension property is null.

The Extension property provides for application-defined information, like a large binary object, that is associated with the message. It is the responsibility of the receiving application to interpret the contents of the Extension property.

Where possible, you should include message data in the Body property of the message rather than the Extension property.

When working with foreign queues, use the Extension property to specify message properties that do not exist in Message Queuing.

A foreign queue exists in a queuing system other than Microsoft Message Queuing. Message Queuing communicates with such queues through a connector application.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft