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

Met @ Uber met at uberstats.com
Mon Oct 13 15:26:58 EDT 2003


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]
      }
      newset.Add(array);

      return newset;
    }

======================




More information about the Mono-devel-list mailing list