14
¿Cómo aplico MarshalAsAttribute al tipo de devolución del código siguiente?¿Cómo aplica un atributo .net a un tipo de devolución
public ISomething Foo()
{
return new MyFoo();
}
¿Cómo aplico MarshalAsAttribute al tipo de devolución del código siguiente?¿Cómo aplica un atributo .net a un tipo de devolución
public ISomething Foo()
{
return new MyFoo();
}
Según 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();
}