Come si applica un attributo .net a un tipo restituito
-
02-07-2019 - |
Domanda
Come posso applicare MarshalAsAttribute al tipo di ritorno del codice seguente?
public ISomething Foo()
{
return new MyFoo();
}
Soluzione
[return: MarshalAs(<your marshal type>)]
public ISomething Foo()
{
return new MyFoo();
}
Altri suggerimenti
[return:MarshalAs]
public ISomething Foo()
{
return new MyFoo();
}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow