更新时间: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?