Click here to Skip to main content
15,885,546 members
Home / Discussions / C#
   

C#

 
QuestionHow to get values after dictionary sorting by values with linq Pin
igalep13225-Mar-10 1:42
igalep13225-Mar-10 1:42 
AnswerRe: How to get values after dictionary sorting by values with linq Pin
Not Active25-Mar-10 1:46
mentorNot Active25-Mar-10 1:46 
GeneralRe: How to get values after dictionary sorting by values with linq Pin
igalep13225-Mar-10 1:56
igalep13225-Mar-10 1:56 
GeneralRe: How to get values after dictionary sorting by values with linq Pin
igalep13225-Mar-10 2:06
igalep13225-Mar-10 2:06 
AnswerRe: How to get values after dictionary sorting by values with linq Pin
Keith Barrow25-Mar-10 2:02
professionalKeith Barrow25-Mar-10 2:02 
GeneralRe: How to get values after dictionary sorting by values with linq Pin
igalep13225-Mar-10 2:07
igalep13225-Mar-10 2:07 
GeneralRe: How to get values after dictionary sorting by values with linq Pin
igalep13225-Mar-10 5:04
igalep13225-Mar-10 5:04 
GeneralRe: How to get values after dictionary sorting by values with linq Pin
Keith Barrow25-Mar-10 5:25
professionalKeith Barrow25-Mar-10 5:25 
Ditcionaries are not intended for that sort of use, they are supposed to map a collection of [unique] keys to a value. As such they are unordered (there is a SortedDictionary type, but it sorts on key.

What you describe is a more like a list operation, as these have position. Iteraring over specific ranges depends upon what you really want to acheive:

1. You can use Linq to query out specific entries.
2. Dictionaries have a ToList() method, whose results you can iterate over.
3. The are both Keys and Values properties that can be iterated over.
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.

GeneralRe: How to get values after dictionary sorting by values with linq Pin
igalep13225-Mar-10 14:27
igalep13225-Mar-10 14:27 
AnswerRe: How to get values after dictionary sorting by values with linq Pin
lukaszbl25-Mar-10 2:04
lukaszbl25-Mar-10 2:04 
QuestionDelegates - What is the use of it? Pin
Praveen Raghuvanshi25-Mar-10 1:19
professionalPraveen Raghuvanshi25-Mar-10 1:19 
AnswerRe: Delegates - What is the use of it? Pin
harold aptroot25-Mar-10 1:38
harold aptroot25-Mar-10 1:38 
AnswerRe: Delegates - What is the use of it? [modified] Pin
Keith Barrow25-Mar-10 1:39
professionalKeith Barrow25-Mar-10 1:39 
GeneralRe: Delegates - What is the use of it? Pin
Not Active25-Mar-10 1:44
mentorNot Active25-Mar-10 1:44 
GeneralRe: Delegates - What is the use of it? Pin
DaveyM6925-Mar-10 1:48
professionalDaveyM6925-Mar-10 1:48 
GeneralRe: Delegates - What is the use of it? Pin
Keith Barrow25-Mar-10 1:56
professionalKeith Barrow25-Mar-10 1:56 
QuestionCrystal Report Pin
Syed Shahid Hussain25-Mar-10 1:09
Syed Shahid Hussain25-Mar-10 1:09 
QuestionGet SQL Server 2005 Database Table Details Dynamically Pin
thanushkag25-Mar-10 0:30
thanushkag25-Mar-10 0:30 
AnswerRe: Get SQL Server 2005 Database Table Details Dynamically Pin
Mycroft Holmes25-Mar-10 1:04
professionalMycroft Holmes25-Mar-10 1:04 
AnswerRe: Get SQL Server 2005 Database Table Details Dynamically Pin
Ravi Bhavnani25-Mar-10 2:06
professionalRavi Bhavnani25-Mar-10 2:06 
QuestionResource File Pin
Syed Shahid Hussain25-Mar-10 0:29
Syed Shahid Hussain25-Mar-10 0:29 
AnswerRe: Resource File Pin
Tony Richards25-Mar-10 2:43
Tony Richards25-Mar-10 2:43 
GeneralRe: Resource File Pin
Syed Shahid Hussain25-Mar-10 2:48
Syed Shahid Hussain25-Mar-10 2:48 
AnswerRe: Resource File Pin
Bernhard Hiller25-Mar-10 3:18
Bernhard Hiller25-Mar-10 3:18 
GeneralRe: Resource File Pin
Syed Shahid Hussain25-Mar-10 4:09
Syed Shahid Hussain25-Mar-10 4:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.