Message.Extension Property
Gets or sets additional, application-defined information associated with the message.
[Visual Basic] Public Property Extension As Byte () [C#] public byte[] Extension {get; set;} [C++] public: __property unsigned char get_Extension(); public: __property void set_Extension(unsigned char __gc[]); [JScript] public function get Extension() : Byte[]; public function set Extension(Byte[]);
Property Value
An array of byte values that provides application-defined information associated with the message. The default is a zero-length array.
Exceptions
| Exception Type | Condition |
|---|---|
| InvalidOperationException | The message queue is filtered to ignore the Extension property. |
| ArgumentException | The Extension property is a null reference (Nothing in Visual Basic). |
Remarks
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.
Note A foreign queue exists in a queuing system other than Microsoft Message Queuing. Message Queuing communicates with such queues through a connector application.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
.NET Framework Security:
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries From Partially Trusted Code
See Also
Message Class | Message Members | System.Messaging Namespace | AppSpecific | Body