C# Action as Parameter for continueWith Xamarin Forms

I can't get "continueWith" to work with a Action as Parameter, it simply does nothing and there is no error.

private async void BaumPage_Appearing(object sender, EventArgs e)
{
    if ( App.db_objekte == null )
    {
         Action<Task> someMethod;
         someMethod = delegate (Task t) { Console.WriteLine("hello world"); };

         MsgBoxWithAction("DB Empty.", someMethod);
         return;
    }
}
public void MsgBoxWithAction(string sMsg, Action<Task> a)
{
     DisplayAlert("Fehler", sMsg, "OK").ContinueWith(t => a);
}
`

I prefer using async-await rather than continue with, Makes more sense since the code doesn't look very messy and not to mention its way easier to understand as well.

The code you have mentioned above can easily be converted into something like:

public async void MsgBoxWithAction(string sMsg, Action<Task> a)
{
    await DisplayAlert("Fehler", sMsg, "OK");
    a();
}

For a basic comparison on how async-await Is better than ContinueWith check here