CA2000 DisposeObjectsBeforeLosingScope
Why does code such as this display a false positive on the dispose when the dispose will always execute?
SqlTransaction txn =null;SqlCommand addFingerprint =null;try {addFingerprint =
newSqlCommand("xxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxx");conn.Open();
txn = conn.BeginTransaction();
addFingerprint.Transaction = txn;
SqlContext.Pipe.ExecuteAndSend(addFingerprint);();txn.Commit();
}
catch (SqlException) {txn.Rollback();
throw;}
finally { if (conn !=null && conn.State ==ConnectionState.Open) conn.Close(); if (addFingerprint !=null) addFingerprint.Dispose();}

