How can I start the task by string?
I need something like this, is this possible to do?
void Main()
{
var input = Console.ReadLine();
Task.Run(() => input );
}
9 Replies
what would this do?
start a task by it's name(string input from user)
tasks don't have names
if i typed in "hello", in that example, what would you expect to happen
If I type "ping" - start task ping
ok, that's a method called ping, not a task
i would suggest something like this
okay, I will try it
thx :)
That's work. Thank you so much