I had two DateTime lists and was intersecting them with no problems:
IEnumerable<DateTime> both = list1.Intersect(list2);
I have the custom data type and still need to find the intersection:
public class AssetRecord
{
// Custom data type. Each object has time and price
public DateTime AssetDate { get; set; }
public double AssetPrice { get; set; }
}
// Lits initialization
public static List<AssetRecord> list1 = new List<AssetRecord> { };
// Key/Values - Date/Price. Custom data type is used to store an object in the collection
public static List<AssetRecord> list2 = new List<AssetRecord> { };
The problem is that IEnumerable takes only DataTime lists as an input and I do not have that data type anymore. Is it possible to find intersection using custom types? Or is it possible to take only Date field from created data type and convert it to List and then pass it to IEnumerable?