julien <ju****@sobrier.net> wrote:
on the following line:
Thread startThread = new Thread(new
ThreadStart(plugin.StartPlugin(session)));
I got an error from the C# compiler:
[csc] c:\XXX\foo.cs(407,53): error CS0149: Method name expected
Column 53 is the T of ThreadStart.
I don't understand what is wrong. I' following the example given in the
MSDN doc, and from another book.
I suspect you're not *quite* following the example - you're calling a
method, rather than providing a method *name*. Normally you'd do:
Thread startThread = new Thread (new ThreadStart (plugin.StartPlugin));
Note that if your method takes a parameter, you can't use it as a
ThreadStart anyway.
See
http://www.pobox.com/~skeet/csharp/t...rameters.shtml
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too