c# - Select all keys except some key -


i know 1 key dictionary , want select other key present.

i don't want remove keyvalue pair know want select rest.

for example, have:

key:health value: 123  key:vision value: 345  key:dental value:567 

and know health there. want select other keyvalue pairs except key:health

could 1 suggest c# code implement ?

var allkeyvaluesbuthealth = dict.where(kv => kv.key != "health"); 

since deferred executed linq query it's idea materialize tolist, toarray or todictionary if want use multiple times.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -