且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

出"使用&QUOT的***实践;在C#中的关键字

更新时间:2022-06-07 08:43:25

还有一个原因是,静态code分析(=的FxCop)的一个规则点,你当你使用参数。我会说:只能使用退出当真正需要的互操作类型的场景。在其他情况下,根本就没有退出使用。但也许这只是我?

There is a reason that one of the static code analysis (=FxCop) rules points at you when you use out parameters. I'd say: only use out when really needed in interop type scenarios. In all other cases, simply do not use out. But perhaps that's just me?