[Mono-list] Re: Delegates on windows XP

Amish Munshi Amish Munshi <amishmunshi@gmail.com>
Mon, 1 Nov 2004 09:27:26 +0530


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.
>