Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

linq get a dictionary key and value c#

 var values = dictionary.Where(x => someKeys.Contains(x.Key)).Select(x => x.Value);
 var keys = dictionary.Where(x => someValues.Contains(x.Value)).Select(x => x.Key);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #linq #dictionary #key
ADD COMMENT
Topic
Name
8+4 =