How can I do this?
public abstract class A {
protected abstract async Task foo(int a);
protected async Task bar(int a) {
await foo(a);
}
}
public class B : A {
public async Task foo(int a) {
return a + 1;
}
}
basically I want to declare a async function without a body in in the abstract class, also have another function in the abstract class use the function like it existed. But have that function defined with a body in the class that implements the abstract class.
Note: the foo
in my code has something in it that uses await, so it has to be async.
Is this possible?