I have an array of ServiceGrid items called services, the relevant properties are shown below:
svcId / svcName / svcBillingRate/ and more....
5 / serviceA / 10.00 .
19 / serviceB / 19.25
11 / serviceC / 24.00
17 / serviceD / 4.50
2 / serviceE / 9.00
I also have a hashset<int> addOnOptions that has a number of svcIds, say 11 and 17
My objective is to end up with:
5 / serviceA / 10.00
19 / serviceB / 19.25
2 / serviceE / 9.00
var theSelectedAddOns = addOnOptions.ToList().Where(x => new[] {services.ToList()}.Contains(x));
Not sure what to make of this error message:
'List<ServiceGrid>[]' does not contain a definition for 'Contains' and the best extension method overload 'MemoryExtensions.Contains<int>(ReadOnlySpan<int>, int)' requires a receiver of type 'ReadOnlySpan<int>'
I am out of ideas on how to proceed here.
