This question is trivial and it is for readability. I would just like to know weather the following line of code has any alternative ? Is that code is correct in the means of Readability and style?
Task newTask = new Task(() => { });
EDIT:
This task will be created when certain condition/rule met. In that case i would assign an Action
to this class.
if(condition Met && newTask.Status != TaskStatus.Running )
{
newTask = Task.Factory.StartNew(Action);
}
Thanks