Re: COM Interop Types
Benjamin Schwehn <[email protected]> Wed, 24 Jun 2009 16:06:28 +0200
| Newsgroups | gmane.comp.windows.devel.dotnet.advanced |
|---|---|
| Message-ID | <[email protected]> |
On 24.06.2009 15:58, Mike Andrews wrote:
> That's kinda what I was looking for.
> However, I want to decorate a property with that. Can that be done?
> The property is a System.Decimal type. MarshallAsAttribute can't be applied
> to a property (or so it says).
You can do something like:
private decimal _myVar;
public decimal myVar
{
[return: MarshalAs(UnmanagedType.Currency)]
get { return _myVar; }
[param: MarshalAs(UnmanagedType.Currency)]
set { _myVar = value; }
}
Ben
===================================
View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives