Represents a transaction.
Assembly: System.Transactions (in System.Transactions.dll)
Thetype exposes the following members.
|Clone||Creates a clone of the transaction.|
|DependentClone||Creates a dependent clone of the transaction.|
|Dispose||Releases the resources that are held by the object.|
|EnlistDurable(Guid, IEnlistmentNotification, EnlistmentOptions)||Enlists a durable resource manager that supports two phase commit to participate in a transaction.|
|EnlistDurable(Guid, ISinglePhaseNotification, EnlistmentOptions)||Enlists a durable resource manager that supports single phase commit optimization to participate in a transaction.|
|EnlistPromotableSinglePhase||Enlists a resource manager that has an internal transaction using a promotable single phase enlistment (PSPE).|
|EnlistVolatile(IEnlistmentNotification, EnlistmentOptions)||Enlists a volatile resource manager that supports two phase commit to participate in a transaction.|
|EnlistVolatile(ISinglePhaseNotification, EnlistmentOptions)||Enlists a volatile resource manager that supports single phase commit optimization to participate in a transaction.|
|Equals||Determines whether this transaction and the specified object are equal. (Overrides Object.Equals(Object).)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetHashCode||Returns the hash code for this instance. (Overrides Object.GetHashCode().)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|Rollback()||Rolls back (aborts) the transaction.|
|Rollback(Exception)||Rolls back (aborts) the transaction.|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
The System.Transactions namespace provides both an explicit programming model based on the class, as well as an implicit programming model using the TransactionScope class, in which transactions are automatically managed by the infrastructure. It is highly recommended that you use the easier implicit model for development. To get started, please see the Implementing An Implicit Transaction Using Transaction Scope topic. For more information on writing a transactional application, see Writing A Transactional Application.
The class contains methods used by developers implementing resource managers for enlistment. It also provides functionalities for cloning a transaction and controlling the current transaction context. You can obtain the current transaction, if one is set, using the static Current property.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.