Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
AnswerRe: PDF Creation in C# Pin
stancrm18-Aug-06 10:39
stancrm18-Aug-06 10:39 
AnswerRe: PDF Creation in C# Pin
Suelinda_W7-Sep-06 10:19
Suelinda_W7-Sep-06 10:19 
Questionwhat would the best way to approach this project be? Pin
mmatteson18-Aug-06 9:43
mmatteson18-Aug-06 9:43 
AnswerRe: what would the best way to approach this project be? Pin
Vitaliy Tsvayer18-Aug-06 10:47
Vitaliy Tsvayer18-Aug-06 10:47 
QuestionWant array with elements of different types - use what instead of an array? Pin
LuluSailor18-Aug-06 8:59
LuluSailor18-Aug-06 8:59 
AnswerRe: Want array with elements of different types - use what instead of an array? Pin
stancrm18-Aug-06 9:09
stancrm18-Aug-06 9:09 
AnswerRe: Want array with elements of different types - use what instead of an array? Pin
Not Active18-Aug-06 9:11
mentorNot Active18-Aug-06 9:11 
AnswerRe: Want array with elements of different types - use what instead of an array? [modified] Pin
eggsovereasy18-Aug-06 9:36
eggsovereasy18-Aug-06 9:36 
If you want to store two different types like that and they correspond on a one to one basis I would use a dictionary.

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

d.Add("Blue", 0x0000FF);
d.Add("Red", 0xFF0000);
d.Add("Green", 0x00FF00);

Console.WriteLine( "Blue is " + d["Blue"]);
Console.WriteLine("\nRed is " + d["Red"]);
Console.WriteLine("\nGreen is " + d["Green"]);


If you are going to have many different and arbitrary classes you probably need to rethink your program before you start plugging them all into an ArrayList, yank em out, and hope you cast correctly.


-- modified at 15:36 Friday 18th August, 2006
AnswerRe: Want array with elements of different types - use what instead of an array? Pin
Coding C#19-Aug-06 1:09
Coding C#19-Aug-06 1:09 
QuestionHow to print MultiPage in VS2005 ? Pin
hdv21218-Aug-06 8:16
hdv21218-Aug-06 8:16 
AnswerRe: How to print MultiPage in VS2005 ? Pin
Nader Elshehabi18-Aug-06 9:37
Nader Elshehabi18-Aug-06 9:37 
Questioninheriting forms Pin
Harikrk18-Aug-06 7:55
Harikrk18-Aug-06 7:55 
AnswerRe: inheriting forms Pin
stancrm18-Aug-06 9:11
stancrm18-Aug-06 9:11 
GeneralRe: inheriting forms Pin
Nader Elshehabi18-Aug-06 9:46
Nader Elshehabi18-Aug-06 9:46 
GeneralRe: inheriting forms Pin
Colin Angus Mackay18-Aug-06 12:25
Colin Angus Mackay18-Aug-06 12:25 
GeneralRe: inheriting forms Pin
Nader Elshehabi18-Aug-06 22:43
Nader Elshehabi18-Aug-06 22:43 
QuestionDraging a form Pin
Harikrk18-Aug-06 7:52
Harikrk18-Aug-06 7:52 
AnswerRe: Draging a form Pin
stancrm18-Aug-06 9:14
stancrm18-Aug-06 9:14 
AnswerRe: Draging a form Pin
Ravi Bhavnani18-Aug-06 12:38
professionalRavi Bhavnani18-Aug-06 12:38 
QuestionMemory status Pin
Harikrk18-Aug-06 7:48
Harikrk18-Aug-06 7:48 
AnswerRe: Memory status Pin
stancrm18-Aug-06 9:35
stancrm18-Aug-06 9:35 
GeneralRe: Memory status Pin
Harikrk19-Aug-06 6:35
Harikrk19-Aug-06 6:35 
Questiontreeview, again. Pin
Anthony Mushrow18-Aug-06 7:10
professionalAnthony Mushrow18-Aug-06 7:10 
AnswerRe: treeview, again. Pin
led mike18-Aug-06 7:15
led mike18-Aug-06 7:15 
QuestionRe: treeview, again. Pin
Anthony Mushrow18-Aug-06 7:57
professionalAnthony Mushrow18-Aug-06 7:57 

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.