Kep*_*boy 17 .net c# attributes return-type
如何将MarshalAsAttribute应用于下面代码的返回类型?
public ISomething Foo()
{
return new MyFoo();
}
Run Code Online (Sandbox Code Playgroud)
Fra*_*nov 38
根据http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshalasattribute.aspx:
[return: MarshalAs(<your marshal type>)]
public ISomething Foo()
{
return new MyFoo();
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5545 次 |
| 最近记录: |