Just I want to find any of the intColl of CustomerData is of single digit in length and select that customerData.
List<CustomerData> cdata = new List<CustomerData>();
cdata.Add(
new CustomerData { Key = 1, Name = "Marc",
intColl = new List<int>() { 1, 2, 3 }
}
);
cdata.Add(
new CustomerData { Key = 2, Name = "Eric",
intColl = new List<int>() { 11, 12, 13 }
}
);
cdata.Add(
new CustomerData { Key = 3, Name = "Peter",
intColl = new List<int>() { 111, 112, 113 }
}
);
cdata.Add(
new CustomerData { Key = 4, Name = "Peter",
intColl = new List<int>() { 1111, 1112, 1113 }
}
);
when executing the following
var query = cdata.Any(d => d.intColl.Find(c => c == 1));
I receive
Cannot implicitly convert type 'int' to 'bool'.