TransactionScope Constructor (Transaction, TimeSpan)

Note: This constructor is new in the .NET Framework version 2.0.

Initializes a new instance of the TransactionScope class with the specified timeout value, and sets the specified transaction as the ambient transaction, so that transactional work done inside the scope uses this transaction.

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

public TransactionScope (
	Transaction transactionToUse,
	TimeSpan scopeTimeout
)
public TransactionScope (
	Transaction transactionToUse, 
	TimeSpan scopeTimeout
)
public function TransactionScope (
	transactionToUse : Transaction, 
	scopeTimeout : TimeSpan
)

Parameters

transactionToUse

The transaction to be set as the ambient transaction, so that transactional work done inside the scope uses this transaction.

scopeTimeout

The TimeSpan after which the transaction scope times out and aborts the transaction.

Windows 98, Windows 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: