This documentation is archived and is not being maintained.

Message.IsLastInTransaction Property

Gets a value indicating whether the message was the last message sent in a transaction.

[Visual Basic]
Public ReadOnly Property IsLastInTransaction As Boolean
[C#]
public bool IsLastInTransaction {get;}
[C++]
public: __property bool get_IsLastInTransaction();
[JScript]
public function get IsLastInTransaction() : Boolean;

Property Value

true if the message was the last message sent in a single transaction; otherwise, false.

Exceptions

Exception Type Condition
InvalidOperationException The message has not been sent. This property can only be read on messages retrieved from a queue.

-or-

The message queue is filtered to ignore the IsLastInTransaction property.

Remarks

Receiving applications use the IsLastInTransaction property to verify that a message was the last message sent in a single transaction to a single queue.

Note   This property is available only with Message Queuing 2.0 and later.

To verify transaction boundaries, you can use the IsLastInTransaction property along with two other properties: IsFirstInTransaction and TransactionId. Use the former to check whether a message was the first message sent in the transaction, and use the latter to retrieve the identifier of the transaction.

If only one message is sent in a transaction, the IsFirstInTransaction and IsLastInTransaction properties are both set to true.

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: 

See Also

Message Class | Message Members | System.Messaging Namespace | IsFirstInTransaction | TransactionId | Transactional

Show: