[CSHARP-732] ICollection<T>.Contains is not supported in a LINQ Expression Created: 19/Apr/13 Updated: 20/Mar/14 Resolved: 19/Apr/13 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.8.1 |
| Fix Version/s: | 1.8.2 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Zaid Masud | Assignee: | Craig Wilson |
| Resolution: | Done | Votes: | 0 |
| Labels: | LINQ | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
This unit test works when you declare the type as int[], but not when you declare the type as IList<int>. I believe this also affects LINQ expressions using Contains or In. IEnumerable, array types, and List types are supported but IList throws an Unsupported exception.
|
| Comments |
| Comment by Craig Wilson [ 19/Apr/13 ] |
|
Yep, I've already fixed it and pushed it up for code review. In the meantime, just do a .ToList() on whatever you are using. Thanks for reporting. |
| Comment by Zaid Masud [ 19/Apr/13 ] |
|
The same problem exists for ICollection as well. |