14
Comment appliquer le MarshalAsAttribute au type de retour du code ci-dessous?Comment appliquer un attribut .net à un type de retour
public ISomething Foo()
{
return new MyFoo();
}
Comment appliquer le MarshalAsAttribute au type de retour du code ci-dessous?Comment appliquer un attribut .net à un type de retour
public ISomething Foo()
{
return new MyFoo();
}
Selon 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();
}