I am getting an error with this code:
if (!App.selectedPhrases.Any())
Here's the error message:
Xamarin Exception Stack: System.ArgumentNullException: Value cannot be null. Parameter name: source at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0000d] in :0 at Japanese.DeckTabViewModel.ShowFirstMessageAsync () [0x00029] in <75f30b75b8d1435e80e8b7703a671cac>:0 at Japanese.DeckTabViewModel.OnAppearing () [0x0006c] in <75f30b75b8d1435e80e8b7703a671cac>:0 at Japanese.DeckTabPage.OnAppearing () [0x0006d] in <75f30b75b8d1435e80e8b7703a671cac>:0 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) [0x00000] in <3ad100fe60d44e1c8a81197ba1997e7e>:0 at Android.App.SyncContext+<>c__DisplayClass2_0.b__0 () [0x00000] in :0 at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in :0 at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in :0 at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.34(intptr,intptr)
Does anyone have any ideas on what might be happening, how I could find the exact line number in the exception and then also how I could resolve this.
In particular I am confused as to why the stacktrace doesn't show any line number. Does anyone know why this is?
One more question. How can I avoid the use of a "!" here as I find this very confusing.