If I have a class that inherits a base class, and both classes inherit this interface
public interface BaseClass
{
Task<object> GetAsync();
}
If the base class implements its method as:
public async Task<object> GetAsync()
{
object o = async DoSomethingAsync();
return o;
}
And the class that inherits the base class overrides the method but calls the base class method still, does it matter if you put async await? e.g?
// Option 1
public async Task<object> GetAsync()
{
DoSomethingElse();
return await base.GetAsync();
}
// Option 2
public Task<object> GetAsync()
{
DoSomethingElse();
return base.GetAsync();
}
What is the difference between the two? Is there any?