-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Hi
I've been trying to track down a problem in my MonoTouch app, which I updated to 103.1 yesterday.
It appears to be caused by this change:
Specifically:
private IList BuildList(Type type, object parent)
{
var list = (IList)Activator.CreateInstance(type);
//var listType = type.GetInterfaces().First(x => x.GetGenericTypeDefinition() == typeof(IList<>));
//var itemType = listType.GetGenericArguments()[0];
var itemType = type.GetGenericArguments()[0];
(the 2 commented lines are the current code. The line after is what it USED to be)
The MonoTouch bug case is here:
https://bugzilla.xamarin.com/show_bug.cgi?id=6031
I'm not sure of the repercussions of the change above, but it makes my code work, where before it was crashing around 75% of the time.
Is there another way to do it? it's the First(x => x.GetGenericTypeDefinition()) which is causing the issue.
Thanks.
Metadata
Metadata
Assignees
Labels
No labels