I would give up logic and say:
for (int i = _from; i <= _to; i++) { try { using (TransactionScope scope = new TransactionScope()) { if (condition is false) {
On the other hand, if you completely miss the use, as Dave Bish suggests, your code will work better, because in cases where you do not want to use, you will not create an object, you simply will not do anything with it ..
user800576
source share