SunnyDark
asked on
How to apply MarshalAs Attribute to return value of a property in managed C++
Hi,
I can apply a MarshalAs attribute to a return value of a property like so:
I can apply a MarshalAs attribute to a return value of a property like so:
public decimal Foo {
[return: MarshalAs(UnmanagedType.Currency)]
get { return this.foo; }
[param: MarshalAs(UnmanagedType.Currency)]
set { this.foo = value; }
}
How would I do the same in managed C++?
property RetClass^ Foo{
RetClass^ get() {
return gcnew RetClass();
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.