Question

Comment appliquer le MarshalAsAttribute au type de retour du code ci-dessous?

public ISomething Foo()
{
    return new MyFoo();
}
Était-ce utile?

La solution

Selon http://msdn.microsoft. com / fr-fr / library / system.runtime.interopservices.marshalasattribute.aspx :

[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
scroll top