[Mono-list] accessing struct instance from managed code

Raja R Harinath rharinath@novell.com
Mon, 28 Feb 2005 15:51:15 +0530


Hi,

Jonathan Pryor <jonpryor@vt.edu> writes:

> On Fri, 2005-02-25 at 14:02 -0500, Nigel Benns wrote:
>> ok... this is the lowdown :)
>> 
>> in C:
>> 
>> struct try {
>> 
>>    int *blah;
>> 
>> }
>
> In C#:
>
> 	struct try {
> 		public System.IntPtr blah;
> 	}

Except that it probably has to be written as 'struct @try', and used as
@try everywhere else.  (I haven't checked if it works in mcs ;-)

Even better would be to give it a different name.

- Hari