Im trying to get a bool returned from a task but it keeps displaying the following warning.
Quote
Not all code paths return a value in lambda expression of type 'System.Func<bool>'
Here is the code. Note: If i remove the 2 <bool> then it works fine except it doesnt return a value.
public void CallMethodCallAsync(int initial, int final, string filePath)
{
Task<bool> tsk = Task.Factory.StartNew<bool>(() =>
{
MethodCall(initial, final, filePath);
});
}
public bool MethodCall(int initial, int final, string filePath)
{
return true;
}
any pointers would be appreciated.
Thanks

New Topic/Question
Reply



MultiQuote




|