Click here to Skip to main content
15,891,704 members
Home / Discussions / C#
   

C#

 
GeneralRe: Application Settings Pin
Eddy Vluggen23-Jul-13 0:29
professionalEddy Vluggen23-Jul-13 0:29 
QuestionResponsive UI - WPF with Properties Pin
SynergiAios22-Jul-13 15:09
SynergiAios22-Jul-13 15:09 
AnswerRe: Responsive UI - WPF with Properties Pin
Dave Kreskowiak22-Jul-13 16:32
mveDave Kreskowiak22-Jul-13 16:32 
GeneralRe: Responsive UI - WPF with Properties Pin
SynergiAios23-Jul-13 0:18
SynergiAios23-Jul-13 0:18 
QuestionOO Design for Specifc Problem Pin
KeithF22-Jul-13 6:17
KeithF22-Jul-13 6:17 
AnswerRe: OO Design for Specifc Problem Pin
KeithF22-Jul-13 21:41
KeithF22-Jul-13 21:41 
AnswerRe: OO Design for Specifc Problem Pin
Eddy Vluggen23-Jul-13 0:30
professionalEddy Vluggen23-Jul-13 0:30 
GeneralRe: OO Design for Specifc Problem Pin
KeithF30-Jul-13 22:49
KeithF30-Jul-13 22:49 
QuestionMicrosoft Expression Encoder with IIS Live Smooth Streaming Issue Pin
Member 1003572121-Jul-13 21:46
Member 1003572121-Jul-13 21:46 
AnswerRe: Microsoft Expression Encoder with IIS Live Smooth Streaming Issue Pin
Dave Kreskowiak22-Jul-13 1:46
mveDave Kreskowiak22-Jul-13 1:46 
QuestionGetGuiThreadInfo can not get the caret's position Pin
goldli8820-Jul-13 23:12
goldli8820-Jul-13 23:12 
QuestionHow to Create Dynamic Buttons With Students Roll No. on It From Database Pin
jackspero1820-Jul-13 1:38
jackspero1820-Jul-13 1:38 
AnswerRe: How to Create Dynamic Buttons With Students Roll No. on It From Database Pin
Garth J Lancaster20-Jul-13 2:05
professionalGarth J Lancaster20-Jul-13 2:05 
QuestionC# unmanage DLL export Pin
hijeenu19-Jul-13 10:32
hijeenu19-Jul-13 10:32 
QuestionUpdate Shorthand? Pin
eddieangel19-Jul-13 8:37
eddieangel19-Jul-13 8:37 
AnswerRe: Update Shorthand? Pin
Dave Kreskowiak19-Jul-13 9:50
mveDave Kreskowiak19-Jul-13 9:50 
AnswerRe: Update Shorthand? Pin
Abhinav S19-Jul-13 18:48
Abhinav S19-Jul-13 18:48 
AnswerRe: Update Shorthand? Pin
Jean A Brandelero22-Jul-13 3:59
Jean A Brandelero22-Jul-13 3:59 
QuestionCalling VB 6 OCX from C# EXE Pin
matinon2219-Jul-13 2:18
matinon2219-Jul-13 2:18 
AnswerRe: Calling VB 6 OCX from C# EXE Pin
Dave Kreskowiak19-Jul-13 2:21
mveDave Kreskowiak19-Jul-13 2:21 
GeneralRe: Calling VB 6 OCX from C# EXE Pin
matinon2223-Jul-13 22:18
matinon2223-Jul-13 22:18 
GeneralRe: Calling VB 6 OCX from C# EXE Pin
Dave Kreskowiak24-Jul-13 3:52
mveDave Kreskowiak24-Jul-13 3:52 
QuestionGeneric collections Pin
PozzaVecia19-Jul-13 0:09
PozzaVecia19-Jul-13 0:09 
I need to use a generic collection of keyvalue pair. I need thr folloeing:

1) should be generic because my values are a customized class
2) iterating should keep the order in which I added Items
3) I should be able to find the index of the element
4) I need access via Key

A dictionary is ok for 1,2,4 but not for 3
SortedList and SortedDictionary are ok for 1, 3, 4 but not for 2.
If I create a
C#
List<keyvaluepair> 
it is ok for 1,2,3 but not for 4 ( I mean not directly)

C#
//Dictionary<string, double> d = new Dictionary<string, double>();
SortedList<string, double> d = new SortedList<string, double>();
            d.Add("z", 1);
            d.Add("a", 2);
            d.Add("c", 3);
            d.Add("b", 4);

            foreach (KeyValuePair<string,double> k in d)
            {
                Console.WriteLine(k.Key + " " + k.Value);
            }

// output: a 2  b 4 c 3 z 1
// but i need to preserve the order in whicth I added.
// I need output: z 1 a 2 c 3 b 4
// using Dictionary I preserve the order but how can select item using an index?

KeyValuePair<string, double> i_item = d.ElementAt(2); // if d is a Dictionary it is not possible


Any suggestion?
Thanks for your time
AnswerRe: Generic collections Pin
Nicholas Marty19-Jul-13 0:41
professionalNicholas Marty19-Jul-13 0:41 
GeneralRe: Generic collections Pin
PozzaVecia19-Jul-13 1:12
PozzaVecia19-Jul-13 1:12 

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.