Click here to Skip to main content
15,906,625 members
Home / Discussions / C#
   

C#

 
GeneralRe: Degrees, minutes and seconds to Decimal Degrees Pin
Abhinav S27-Mar-10 7:27
Abhinav S27-Mar-10 7:27 
GeneralRe: Degrees, minutes and seconds to Decimal Degrees Pin
Darrall27-Mar-10 7:35
Darrall27-Mar-10 7:35 
GeneralRe: Degrees, minutes and seconds to Decimal Degrees Pin
Tarakeshwar Reddy27-Mar-10 7:52
professionalTarakeshwar Reddy27-Mar-10 7:52 
GeneralRe: Degrees, minutes and seconds to Decimal Degrees Pin
Richard MacCutchan27-Mar-10 7:52
mveRichard MacCutchan27-Mar-10 7:52 
AnswerRe: Degrees, minutes and seconds to Decimal Degrees Pin
Tarakeshwar Reddy27-Mar-10 8:02
professionalTarakeshwar Reddy27-Mar-10 8:02 
GeneralRe: Degrees, minutes and seconds to Decimal Degrees Pin
Darrall27-Mar-10 14:51
Darrall27-Mar-10 14:51 
Questionupdate Dictionary with new KeyValuePair set Pin
igalep13227-Mar-10 4:07
igalep13227-Mar-10 4:07 
AnswerRe: update Dictionary with new KeyValuePair set[modified] Pin
Dan Mos27-Mar-10 4:35
Dan Mos27-Mar-10 4:35 
I don't think you can update the dictionary.

You must create a new one. Something like this:

Dictionary<int, string> original = new Dictionary<int, string>();
            original.Add(2, "absolutely");
            original.Add(1, "undoubtely");

            var sortedKeys = (from rec in original
                             orderby rec.Key
                             select rec.Key).ToList();

            Dictionary<int, string> second = new Dictionary<int, string>();

            for (int i = 0; i < sortedKeys.Count; i++)
            {
                second.Add(sortedKeys[i], original[sortedKeys[i]]);
            }          


[Edit]A different option is to use the SortedDictionary [/Edit]
AnswerRe: update Dictionary with new KeyValuePair set Pin
Abhinav S27-Mar-10 4:47
Abhinav S27-Mar-10 4:47 
GeneralRe: update Dictionary with new KeyValuePair set Pin
Dan Mos27-Mar-10 5:07
Dan Mos27-Mar-10 5:07 
GeneralRe: update Dictionary with new KeyValuePair set Pin
igalep13227-Mar-10 5:07
igalep13227-Mar-10 5:07 
GeneralRe: update Dictionary with new KeyValuePair set Pin
Dan Mos27-Mar-10 5:32
Dan Mos27-Mar-10 5:32 
GeneralRe: update Dictionary with new KeyValuePair set Pin
igalep13227-Mar-10 5:35
igalep13227-Mar-10 5:35 
GeneralRe: update Dictionary with new KeyValuePair set Pin
Dan Mos27-Mar-10 5:42
Dan Mos27-Mar-10 5:42 
GeneralRe: update Dictionary with new KeyValuePair set Pin
igalep13227-Mar-10 5:45
igalep13227-Mar-10 5:45 
AnswerRe: update Dictionary with new KeyValuePair set Pin
Daniel Grunwald27-Mar-10 7:18
Daniel Grunwald27-Mar-10 7:18 
GeneralRe: update Dictionary with new KeyValuePair set Pin
PIEBALDconsult27-Mar-10 17:23
mvePIEBALDconsult27-Mar-10 17:23 
QuestionHow can i know from which interface the method is calling? Pin
Satish - Developer27-Mar-10 2:46
Satish - Developer27-Mar-10 2:46 
AnswerRe: How can i know from which interface the method is calling? Pin
Nuri Ismail27-Mar-10 3:03
Nuri Ismail27-Mar-10 3:03 
AnswerRe: How can i know from which interface the method is calling? Pin
AspDotNetDev27-Mar-10 3:13
protectorAspDotNetDev27-Mar-10 3:13 
QuestionHow to write the design editor? Pin
yu-jian27-Mar-10 1:34
yu-jian27-Mar-10 1:34 
AnswerRe: How to write the design editor? Pin
yu-jian28-Mar-10 3:34
yu-jian28-Mar-10 3:34 
GeneralRe: How to write the design editor? Pin
OriginalGriff28-Mar-10 4:10
mveOriginalGriff28-Mar-10 4:10 
QuestionA question on SqlCommand.CommandText Pin
Dewald26-Mar-10 23:01
Dewald26-Mar-10 23:01 
AnswerRe: A question on SqlCommand.CommandText [modified] Pin
Dan Mos27-Mar-10 0:24
Dan Mos27-Mar-10 0:24 

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.