Link to home
Start Free TrialLog in
Avatar of SunnyDark
SunnyDarkFlag for Israel

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:

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(); 
 }
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of SunnyDark
SunnyDark
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial