I have a Dictionary
private readonly Dictionary<int, BinaryAssetExtensionDto> _identityMap;
And I would like to do something like this:
if(_identityMap.Values.Contains(x => x.extension == extension))...
Is this possible because previous code doesn't work.
Now I'm doing it like this:
var result = _identityMap.Values.ToList().Find(x => x.extension == extension);
if (result != null) return result;
using System.Linq;
...
_identityMap.Values.Any(x=>x.extension==extension)
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