I've seen both when looking up P/Invoke definitions... sometimes [Out]
is used, and sometimes out
... I'm assuming they're the same.
问问题
233 次
2 回答
4
当在上下文中使用它们时,它们是等价的P/Invoke
- 请参阅OutAttribute。
您可以将 OutAttribute 应用于通过引用传递的值和引用类型,以将 In/Out 行为更改为 Out-only 行为,这相当于在 C# 中使用 out 关键字。
于 2013-05-30T12:20:48.190 回答
1
除了 James 的回答,请注意 out 上下文关键字在两种情况下使用:
作为参数列表中的参数修饰符
在接口和委托中的泛型类型参数声明中
于 2013-05-30T12:24:53.393 回答