Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I read here and there on the net that it is always better to set up a transaction like below:
using (Transaction tx = new Transaction(doc, name)) { tx.Start(); some stuff here tx.Commit(); }
The alternative is like:
Transaction tx = new Transaction(doc, name); tx.Start(); some stuff here tx.Commit();
What is the reason the first is better than the latter? Or you have a different opinion? Please share.
Solved! Go to Solution.