This looks like an error in the logic for overloading expressions in C # expressions. The combination of calling the type constructor and passing the associated delivery is represented by the key. Removing any of them seems to fix the problem. For example, you can call an expression specified explicitly: myList to myList ICollection<DateTime> (this does not fix all the cases I tried)
Here is an example of a program I wrote to narrow down the problem
class C<T> { public C(ICollection<T> collection) { } } static void Example<T>(ICollection<T> collection) { }
In doing so, you can try the following ratings
Example(myList) - works without errorsnew C<DateTime>(myList) - Crash with the same error
At this point, I think you should point the error to Connect . This is definitely a bug (similar code works fine in VB.Net)
Jaredpar
source share