From 6fbfd67c0524cd1c905bd6055189d2f08b6d1a30 Mon Sep 17 00:00:00 2001 From: Keith Dahlby Date: Mon, 8 Jul 2019 23:15:03 -0500 Subject: [PATCH] [Core] Avoid ambiguous call CS0121: The call is ambiguous between the following methods or properties: 'Device.InvokeOnMainThreadAsync(Action)' and 'Device.InvokeOnMainThreadAsync(Func)' https://github.com/dotnet/roslyn/issues/14885 https://github.com/dotnet/csharplang/issues/98 --- Xamarin.Forms.Core/Device.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xamarin.Forms.Core/Device.cs b/Xamarin.Forms.Core/Device.cs index fe440e6a5dd..5ccfcb3154b 100644 --- a/Xamarin.Forms.Core/Device.cs +++ b/Xamarin.Forms.Core/Device.cs @@ -124,7 +124,7 @@ public static Task InvokeOnMainThreadAsync(Func func) public static Task InvokeOnMainThreadAsync(Action action) { - object wrapAction() { action(); return null; } + string wrapAction() { action(); return null; } return InvokeOnMainThreadAsync(wrapAction); }