returning in the middle of a using block
问题 Something like: using (IDisposable disposable = GetSomeDisposable()) { //..... //...... return Stg(); } I believe it is not a proper place for a return statement, is it? 回答1: As several others have pointed out in general this is not a problem. The only case it will cause you issues is if you return in the middle of a using statement and additionally return the in using variable. But then again, this would also cause you issues even if you didn't return and simply kept a reference to a