How do I apply the MarshalAsAttribute to the return type of the code below?
public ISomething Foo()
{
return new MyFoo();
}
How do I apply the MarshalAsAttribute to the return type of the code below?
public ISomething Foo()
{
return new MyFoo();
}
According to http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshalasattribute.aspx:
[return: MarshalAs(<your marshal type>)]
public ISomething Foo()
{
return new MyFoo();
}
[return:MarshalAs]
public ISomething Foo()
{
return new MyFoo();
}
© 2022 - 2024 — McMap. All rights reserved.