Looping in Dictionary using c#
Posted on 2015-01-02
I have a dictionary with key,value both int values (dictionary<int>,<int>) about 20 items and want to find if a given input falls within the range of key and value of dictionary.
dictionary items = [100,150],
If user enters 150, since the 120 exist within the first item range ,I should return true and exit the loop
If user enters 160, since the 160 does not exist on any dictionary item' s range ,I should return false and exit the loop
If user enters 510 since the 510 exist within the third item range ,I should return true and exit the loop
I want to accomplish above task using c#