I am attempting to make a list of clients, which is a custom class that i wrote and implemented the parcelable functions in order to pass it between activities but im getting a build error on conversion when calling intent.PutParcelableArrayListExtra
My class prototype isclass Client : Java.Lang.Object, IParcelable
I instantiate the list withIList<Client> clients = new List<Client>()
And i then add two values to the list but then when i try to put it into the intent withintent.PutParcelableArrayListExtra("clientList", clientList);
I get the errorerror CS1503: Argument 2: cannot convert from 'System.Collections.Generic.IList<Core.Client>' to 'System.Collections.Generic.IList<Android.OS.IParcelable>'
So i try to castintent.PutParcelableArrayListExtra("clientList", (IList<Parcelable>)clientList);
But i get this errorerror CS1503: Argument 2: cannot convert from 'System.Collections.Generic.IList<Android.OS.Parcelable>' to 'System.Collections.Generic.IList<Android.OS.IParcelable>'
And it is my only error. Any help would be greatly appreciated! I'm new to Xamarin and Android development entirely and i'm in no way and expert in c#, so it could most likely be a very trivial mistake.
Answers
I am running into this same problem.
Have you guys find a way to solve this? I've got the same error