Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
Transaction Class
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
Transaction Class

Updated: November 2007

Represents a transaction.

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

Visual Basic (Declaration)
<SerializableAttribute> _
Public Class Transaction _
    Implements IDisposable, ISerializable
Visual Basic (Usage)
Dim instance As Transaction
C#
[SerializableAttribute]
public class Transaction : IDisposable, 
    ISerializable
Visual C++
[SerializableAttribute]
public ref class Transaction : IDisposable, 
    ISerializable
J#
/** @attribute SerializableAttribute */ 
public class Transaction implements IDisposable, 
    ISerializable
JScript
public class Transaction implements IDisposable, ISerializable

The System.Transactions namespace provides both an explicit programming model based on the Transaction 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 Transaction 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.

This type is thread safe.

Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

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

.NET Framework

Supported in: 3.5, 3.0, 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker