I’m using MonoDevelop 2.4 in Ubuntu 10.10 and I can’t seem to do a simple C# call.
myList.DGraph.ForEach(delegate(string s){Console.WriteLine(s)});
I receive this as an error:
DirectedGraph.cs(219,78): error CS1525: Unexpected symbol `}'
DirectedGraph.cs(250,1): error CS1525: Unexpected symbol `}', expecting `)', or `,'
DirectedGraph.cs(251,1): error CS8025: Parsing error
It doesn’t seem to like this, although as far as I can tell, this is valid.
You need a semicolon (
;)otherwise that is not a legal method body.