Are there any side effects of returning from inside a using() statement?

前端 未结 5 1329
一向
一向 2021-01-31 07:02

Returning a method value from inside a using statement that gets a DataContext seems to always work fine, like this:

public sta         


        
5条回答
  •  后悔当初
    2021-01-31 07:15

    There are no side effects of returning from inside a using() statement.

    Whether it makes the most readable code is another discussion.

提交回复
热议问题