Transaction.Rollback Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Rolls back (aborts) the transaction.

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

public void Rollback()

Any copy of a transaction object can initiate the rollback of the transaction by calling this method. Only the original transaction object, which is a CommittableTransaction object, can be used to initiate an attempt to commit the transaction. An exception is thrown when this method is called after the outcome of the transaction has already been determined.

.NET Framework
Available since 2.0
Return to top
Show: