[Mono-list] Expression denotes a `type' ,where a `variable, value, method group' error

Trent Mifsud trent.mifsud@infotech.monash.edu.au
Tue, 03 Aug 2004 13:45:16 +1000


Hi there,

I am having some problems compiling my code using Mono v1 under Linux. I 
have checked the archived lists to make sure my error has not been 
reported and thus far I have not found the solution.

The error message I am receiving is as follows

[Task:File=/home/trent/MonoDevelopProjects/LanRevealCmdLine/Main.cs, 
Line=10, Column=-1, Type=Error, Description=Expression denotes a `type' 
where a `variable, value, method group' was expected(CS0119)


Basically I am trying to wire up to an event that exists in another 
Assembly. The references are correct and if I remove the line it will 
compile, so I am not sure why I am getting this problem. I checked it 
under MS's .net (gasp!) and it does work.

many thanks for any help - go mono!

trent


using System;
using LANReveal;

class MainClass
{
   public static void Main(string[] args)
   {
       LANReveal.Worker w = new LANReveal.Worker();
       MainClass m = new MainClass();
       w.completed += LANReveal.WorkCompleted(m.writeToCMDLine);   
//this is line 10 - err line
       w.DoWork(); // starts searching
   }
     private void writeToCMDLine(object [] items)
   {
       Console.WriteLine("IP : " + items[0].ToString() + " NetName : " + 
items[1].ToString());
   }
   public MainClass()
   {
     }
}