[Mono-dev] issue with delegate and annonymous methods

Gert Driesen gert.driesen at telenet.be
Tue Jul 3 16:19:47 EDT 2007


Hi,

I've created a small repro for this issue and submitted a bug report for it:
http://bugzilla.ximian.com/show_bug.cgi?id=82003

Gert
 
-----Original Message-----
From: mono-devel-list-bounces at lists.ximian.com
[mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of Dario
Quintana
Sent: maandag 2 juli 2007 23:23
To: Marek Safar
Cc: mono-devel-list at lists.ximian.com
Subject: Re: [Mono-dev] issue with delegate and annonymous methods

I've update mono from the SVN. Now, 1 question, you have tested the example
with NAnt or Monovelop ?
Because with monodevelop it's working, but when I run NAnt I still got the
message:
 [csc] /home/dario/monosms/src/Mono.Sms/Main.cs(281,49): error CS0103:
The name `Agenda' does not exist in the context of `<>c__CompilerGenerated0'

Thanks and regards

On 7/2/07, Dario Quintana <contacto at darioquintana.com.ar> wrote:
> Ok I gonna try to use the svn version. Now I'm using the Ubuntu 
> package for Mono 1.2.4, maybe it's fixed.
>
> Regards
>
> On 7/2/07, Marek Safar <marek.safar at seznam.cz> wrote:
> > Hello Dario,
> >
> > I could not reproduce the issue with SVN version of gmcs.
> > Can you try to use SVN version of gmcs ?
> >
> > Regards,
> > Marek
> > > I'm using mono1.2.4, and I got this error when I run this application:
> > > http://darioquintana.com.ar/temp/monosms.zip
> > >
> > >       [csc] D:\monosms\src\Mono.Sms\Main.cs(281,49): error CS0103: 
> > > The name `Age nda' does not exist in the context of
`<>c__CompilerGenerated0'
> > >       [csc] Compilation failed: 1 error(s), 0 warnings
> > >
> > > The zip include the NAnt build file to compile.
> > >
> > > The class 
> > > http://monosms.googlecode.com/svn/trunk/src/Mono.Sms/Main.cs
> > > works fine with this method:
> > >
> > >  private void btnAddContact_Click(object sender, EventArgs e)
> > >         {
> > >             Contacts frm = new Contacts();
> > >             frm.Operation = Operation.Add;
> > >
> > >             //bug en gmcs:
> > >             //frm.ContactsEventHandler += delegate(Contact 
> > > contact, Operation op)
> > >             //                                {
> > >             //
Agenda.AddContact(contact);
> > >             //                                    LoadContacts();
> > >             //                                };
> > >
> > >             //Uso esto hasta que lo reparen !
> > >             frm.ContactsEventHandler += AddContact;
> > >
> > >             frm.ShowDialog();
> > >         }
> > >
> > > But with this I got the named exception:
> > >
> > >     private void btnAddContact_Click(object sender, EventArgs e)
> > >         {
> > >             Contacts frm = new Contacts();
> > >             frm.Operation = Operation.Add;
> > >
> > >             //bug en gmcs:
> > >             frm.ContactsEventHandler += delegate(Contact contact,
Operation op)
> > >                                             {
> > >
Agenda.AddContact(contact);
> > >                                                 LoadContacts();
> > >                                             };
> > >
> > >             //Uso esto hasta que lo reparen !
> > >             //frm.ContactsEventHandler += AddContact;
> > >
> > >             frm.ShowDialog();
> > >         }
> > >
> > >
> >
> >
> >
>
>
> --
> Dario Quintana
> http://blog.darioquintana.com.ar
>


--
Dario Quintana
http://blog.darioquintana.com.ar
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list