This documentation is archived and is not being maintained.

Transaction.Current Property

Gets or sets the ambient transaction.

Namespace: System.Transactions
Assembly: System.Transactions (in system.transactions.dll)

Public Shared Property Current As Transaction
Dim value As Transaction

value = Transaction.Current

Transaction.Current = value
/** @property */
public static Transaction get_Current ()

/** @property */
public static void set_Current (Transaction value)

public static function get Current () : Transaction

public static function set Current (value : Transaction)

Not applicable.

Property Value

A Transaction that describes the current transaction.

For more information on ambient transactions, please see the "Transaction Flow Management" section of the Implement Implicit Transactions using Transaction Scope topic.

Although you can set the ambient transaction using this property, you should use the TransactionScope object to manipulate the ambient transaction whenever possible.

This property is thread static.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, 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, 2.0