KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following structure in my code Dictionary<TKeys, TValues> data; . I run some LINQ queries on both data types and often need to switch between Keys and Values . What is the best way to get the list of Keys for given Values and vice versa? Please, notice, that I usually have 'IEnumerable' and 'IEnumerable' as a result of my previous LINQ queries and would like to have something like IEnumerable<TKeys> Dictionary.GetAllKeys(IEnumerable<IValues> vals) and IEnumerable<TValues> Dictionary.GetAllValues(IEnumerable<IKeys> keys) . Maybe I need other data container for this task? Regards, Alexander.
Tags (comma-separated)
Save Edits
Cancel