TransactionScope Constructor

Definition

Initializes a new instance of the TransactionScope class.

public:
 TransactionScope();
public TransactionScope ();
Public Sub New ()

Examples

The following code sample demonstrates creating a TransactionScope activity.

new TransactionScope
{
    Body = new Sequence
    {
        Activities =
        {
            new WriteLine { Text = "    Begin TransactionScope" },

            new PrintTransactionId(),

            new TransactionScopeTest(),

            new WriteLine { Text = "    End TransactionScope" },
        },
    },
},

Applies to