ContextUtil::IsInTransaction Property
.NET Framework (current version)
Gets a value that indicates whether the current context is transactional.
Assembly: System.EnterpriseServices (in System.EnterpriseServices.dll)
| Exception | Condition |
|---|---|
| COMException | There is no COM+ context available. |
The following code example gets the value of a IsInTransaction property.
[Transaction(TransactionOption::Required)] public ref class ContextUtil_IsInTransaction: public ServicedComponent { public: void Example() { // Display whether the current COM+ context is enlisted in a // transaction. Console::WriteLine( "Current context enlisted in transaction: {0}", ContextUtil::IsInTransaction ); } };
.NET Framework
Available since 1.1
Available since 1.1
Show: