I'm trying to get this _valueAdds = List<ValueAddedItemHelper> into gridItems (Dictionary) with _valueAdds being the Key and all the values being false. But I'm not sure how to do this with Lamda. This how far I got below. I did succeed in doing it with a while loop but would like learn to do it with Lamda
gridItems = new Dictionary<ValueAddedItemHelper, bool>();
gridItems = _valueAdds.Select(k => new { k }).ToArray().ToDictionary(t => t, false);
_valueAdds.ToDictionary(t => t, t => false);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With