Re: COM Interop Types
Mike Andrews <[email protected]> Wed, 24 Jun 2009 09:09:36 -0500
| Newsgroups | gmane.comp.windows.devel.dotnet.advanced |
|---|---|
| Message-ID | <[email protected]> |
Thanks guys! That works. I should have made the leap there but for some reason it's Wednesday and the elevator is not going all the way to the top floor yet. On Wed, Jun 24, 2009 at 9:06 AM, Benjamin Schwehn <[email protected]> wrote: > 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 > =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives