[Mono-devel-list] Expression denotes a 'variable' where a'method group' was expected

Todd Berman tberman at gentoo.org
Mon Oct 13 17:50:33 EDT 2003


Is that the use of the DefaultMemberAttribute?

--Todd

> -----Original Message-----
> From: mono-devel-list-admin at lists.ximian.com [mailto:mono-devel-list-
> admin at lists.ximian.com] On Behalf Of Miguel de Icaza
> Sent: October 13, 2003 4:37 PM
> To: Met @ Uber
> Cc: Mono-devel
> Subject: Re: [Mono-devel-list] Expression denotes a 'variable' where
> a'method group' was expected
> 
> Hello,
> 
> > I've been going through the source of OJB.NET and its build file
making
> > changes so that it will compile on Mono/Linux.  I've come across the
> > error CS0119:
> >   Expression denotes a 'variable' where a 'method group'
> >   was expected
> > The code that follows looks OK to me, so I'm not sure if its a bug
in
> > Mono or if its just simply not allowed.  The problematic part is
> > encapsulated by [error] tags.  Any suggestions on how to fix this?
> >
> > ==== Code Snippet ====
> >
> >     /// <summary>
> >     /// Applies a IDictionary function to every object in a Set.
> >     /// </summary>
> >     /// <param name="s">The Set to be Mapped.</param>
> >     /// <param name="m">IDictionary function for Set.</param>
> >     /// <returns>A new Set with Mapped values.</returns>
> >     public Set MapToSet(Set s, IDictionary mDict)
> >     {
> >       Set newset = new Set();
> >       object[] array = new Object[s.Count];
> >       int i = 0;
> >       foreach (object o in s) {
> > [ERROR]
> >         array[i++] = mDict(o);
> > [/ERROR]
> 
> 
> I had never seen this syntax before Interface(parameter).   mDict(o)
> really should be changed to something else.
> _______________________________________________
> 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