TransactionScope Constructor (Transaction, TimeSpan)

TransactionScope.TransactionScope(Transaction, TimeSpan) Constructor

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
)
Not applicable.

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 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

Community Additions

ADD
Show:
© 2016 Microsoft