I want to use TASK for running parallel activities.This task returns a value.How do i use a FUNC inside the task for returning a value?.I get an error at Func.
Task<Row> source = new Task<Row>(Func<Row> Check = () =>
{
var sFields = (
from c in XFactory.Slot("IdentifierA")
where c["SlotID"] == "A100"
select new
{
Field = c["Test"]
});
});
I change my code to
Task source = Task.Factory.StartNew(() =>
{
return
(from c in XFactory.Slot("IdentifierA")
where c["SlotID"] == "A100"
select new
{
Field = c["Test"]
});
}
);