[Mono-list] Re: Delegates on windows XP

Jonathan Gilbert 2a5gjx302@sneakemail.com
Sun, 31 Oct 2004 23:06:24 -0500


I did a few mini tests, and while I have no clue where to go to fix this, I
can say that it is a problem with the runtime and not the compiler. Your
test code compiled with either compiler behaves the same way in the
respective operating systems. Also, I modified the test slightly by
explicitly boxing the integer value:

object q = (x + 1);
amish b = new amish(q.ToString);

It did not help.

Hopefully this info well help someone :-)

Jonathan Gilbert

At 09:27 AM 01/11/2004 +0530, Amish Munshi wrote:
>Hello all,
>
>I tried this on mono-1.1.1 on SuSE Pro 9.1, if I use ./delegate.exe I
>get the correct result, where as "mono delegate.exe" gives me garbage.
>I cannot understand what could be wrong. How is ./delegate.exe
>different from "mono delegate.exe"??????
>
>Amish.
>
>
>
>
>On Sat, 30 Oct 2004 06:21:58 -0700, Amish Munshi <amishmunshi@gmail.com>
wrote:
>> I have mono 1.0.1 and .NET 1.1, .NET2.0 in stalled on winXP Home.
>> The output of following code is given below.
>> 
>> using System;
>> 
>> namespace Munshi.Amish.DBTest
>> {
>>         public class delGT
>>         {
>>                 delegate string amish();
>> 
>>                 public static void Main()
>>                 {
>>                         int x = 10;
>>                         amish a = new amish(x.ToString);
>>                         amish b = new amish((x+1).ToString);
>>                         Console.WriteLine("ToString of amish is : " +
a() + " \nAdding one
>> gives +1 = " + b());
>>                 }
>>         }
>> }
>> 
>> >delegate.exe
>> ToString of amish is : 10
>> Adding one gives +1 = 11
>> 
>> >mono delegate.exe
>> ToString of amish is : 6910616
>> Adding one gives +1 = 6910616
>> 
>> Does delegates work with mono on windows?
>> 
>> Amish.
>>
>_______________________________________________
>Mono-list maillist  -  Mono-list@lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-list
>
>