> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On > Behalf Of [EMAIL PROTECTED] > Sent: Sunday, 15 December 2002 3:34 a.m. > To: Tum > Cc: [EMAIL PROTECTED]; 'mono-list' > Subject: Re: [Mono-list] About Arrays of X > > On Sun, Dec 15, 2002 at 02:14:57AM +1300, Tum wrote: > > Hi, > > > > It won't work because int[] is an array of value types whereas > > IComparable[] is an array of reference types. If you used 'int[]' > > instead of Integer[] in Java you'd get the same problem. > > > > The solution would be to box the ints by putting them inside an > > IComparable[] array instead of an int[] array. > > I thought that in C#, a int type was the same that a Int32 class and, > for this reason, I tried to do it. >
It is, but Int32 is a value type not a reference type. The array would contain the actual values and not a reference to the values. > I'm trying to change int[] to IComparable[] but I don't like it :D The best thing to do (if performance is an issue) might be to pass in an int[] array and an IComparator. ^Tum _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
