I’m sure that I’m missing something simple here, but in Visual Studio 2008 on my current project only List.Contains(T) is present. Being able to use List.Contains(T, IEqualityComparer(T)) would save me a lot of grief. Any quick thoughts on this? Thanks.
*edit:
using System.Linq is not available to me. Is is possible that my project is stuck in .net 2.0 or something along those lines? Anyway to check & fix?
Make sure to reference System.Linq and include it (using System.Linq) in your namespaces.
The second call you are referring to is actually Enumerable.Contains in System.Linq.
Edit in response to comments:
You could make your own version: