Code first. This is what I\'m trying to do. I\'m close, but I think I just need to fix the way I\'ve defined my parameter in the UpdateButton method.
private
private async void UpdateButton(Func> post)
{
if (!await post())
ErrorBox.Text = "Error posting message.";
}
--EDIT--
UpdateButton(()=>Post("ss"));
private async void UpdateButton(Func> post)
{
if (!await post())
this.Text = "Error posting message.";
}
public virtual async Task Post(string messageId)
{
return await Task.Factory.StartNew(() => true);
}