I have 2 List of dates.
List<DateTime> 1st;
List<DateTime> 2nd;
I want a count of matching dates within this 2 dates. I can use the foreach logic & get the results.
But what is the easiest way of achieving this?
I have 2 List of dates.
List<DateTime> 1st;
List<DateTime> 2nd;
I want a count of matching dates within this 2 dates. I can use the foreach logic & get the results.
But what is the easiest way of achieving this?
using System.Linq;
1st.Intersect(2nd).Count();
This should work.
Also you can make inner join using linq