Both are delegates and have the same signature, but I can not use Action as ThreadStart.
Why?
Action doIt;
doIt = () => MyMethod("test");
Thread t;
t = new Thread(doIt);
t.Start();
but this seems to work:
Thread t;
t = new Thread(() => MyMethod("test"));
t.Start();
Try:
or
You're trying to pass an argument of type "Action" to a constructor that takes a ThreadStart. There isn't an implicit conversion defined, so you need to manually invoke the ThreadStart constructor.
The basic form of this error is:
So you could 'solve' your first sample by using the correct delegate type: