If I have an interface, for example:
using System.Threading.Tasks; ... public interface IFoo { Task doIt(); Task<bool> doItAndReturnStuff(); }
and one of the classes that implements this interface simply does not require the use of async methods, how can I fix the redefinition of these functions?
In other words, how to return "void" and "bool" to Task objects correctly?
For example:
public class FooHappensToNotNeedAsync : IFoo { public override Task doIt() {
NOTE. I cannot completely remove the Task material, because some classes implementing this interface are actually asynch.
thanks
c # asynchronous windows-store-apps windows-runtime
swinefeaster
source share