Comment appliquer un attribut .net à un type de retour
-
02-07-2019 - |
Question
Comment appliquer le MarshalAsAttribute au type de retour du code ci-dessous?
public ISomething Foo()
{
return new MyFoo();
}
La solution
[return: MarshalAs(<your marshal type>)]
public ISomething Foo()
{
return new MyFoo();
}
Autres conseils
[return:MarshalAs]
public ISomething Foo()
{
return new MyFoo();
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow