Hehe...
1. YES - They most DEFINATELY should be reversed. Generally, keep everything inside the transaction boundary.
2. The 'finally' clause is redundant. If an exception is thrown, it's gets caught in your 'catch' block - SKIPPING the call to 'Commit()'.
Your code then carries on and in this case there is nothing else. The important point here is that you then pass out of the scope of your 'using'
statement WITHOUT having Commit called on the transaction. This is when Dispose is called on your transaction object which is actually a call to abort,
seeing as you skipped Commit. I prefer to have an explicit 'return' statement in the catch block here, but that's personal preference.
3. The default indexer on symbol tables ,at least, is returning ERASED records I found. I will discuss more after you try this Kerry:
Run your code on a drawing that doesn't have your layer in it.
Then purge that layer.
Then run your code again.
Repeat several times with different combos - I think you will find it fails...not certain though.
Post your results.
Cheers,
Glenn.
PS - Excellent style btw
