Click here to Skip to main content
15,916,318 members
Home / Discussions / C#
   

C#

 
QuestionHashtable - Get picked values Pin
Seraphin20-Nov-05 11:23
Seraphin20-Nov-05 11:23 
AnswerRe: Hashtable - Get picked values Pin
Christian Graus20-Nov-05 11:36
protectorChristian Graus20-Nov-05 11:36 
GeneralRe: Hashtable - Get picked values Pin
Seraphin20-Nov-05 11:51
Seraphin20-Nov-05 11:51 
GeneralRe: Hashtable - Get picked values Pin
Christian Graus20-Nov-05 11:53
protectorChristian Graus20-Nov-05 11:53 
GeneralRe: Hashtable - Get picked values Pin
Seraphin20-Nov-05 12:01
Seraphin20-Nov-05 12:01 
GeneralRe: Hashtable - Get picked values Pin
Christian Graus20-Nov-05 12:10
protectorChristian Graus20-Nov-05 12:10 
GeneralRe: Hashtable - Get picked values Pin
Seraphin20-Nov-05 12:17
Seraphin20-Nov-05 12:17 
AnswerRe: Hashtable - Get picked values Pin
Leslie Sanford20-Nov-05 13:16
Leslie Sanford20-Nov-05 13:16 
Seraphin wrote:
Simple example:

[$0001][00]
[$0002][01]
[$0003][04]
[$0004][01]
[$0005][02]

Recursion - check element and its connectors

1. 0001 - my for loop checks all connectors -> Result: 0002 and 0004 (because Key is 01).


Just so I understand, you're starting with a value of (00)01 and asking which keys have this value? The result in this case being $0002 and $0004?

Seraphin wrote:

2. now check the connectors for connectors (we have 0002 and 0004)
3. 0002 has 0005(key = 02)
and so on .....


So having gotten the $0002 and $0004 keys, you are now interested in which keys have those two keys as values?

This suggestion may be exactly what Christian suggested, but I would switch things around and use the values as keys and the keys as values. Each key would have an array of values. It would look like this:

[00][$0001]
[01][$0002][$0004]
[04][$0003]
[02][$0005]

Asking the question again, which value(s) correspond to the 01 key? Answer: $0002 and $0004. Which value(s) correspond to the key 02? Answer: $0005 Which value(s) correspond to the key 04? Answer: $0003.

I'm a little confused on the differences in number formating, but I'm assuming that they are interchangable. At any rate, I'm probably missing something here, because this answer is too simple. Smile | :)
GeneralRe: Hashtable - Get picked values Pin
Seraphin20-Nov-05 14:24
Seraphin20-Nov-05 14:24 
GeneralRe: Hashtable - Get picked values Pin
Leslie Sanford20-Nov-05 17:28
Leslie Sanford20-Nov-05 17:28 
GeneralRe: Hashtable - Get picked values Pin
Seraphin21-Nov-05 4:16
Seraphin21-Nov-05 4:16 
QuestionHow can I reference from a string to an objectname? Pin
Slerp20-Nov-05 10:30
Slerp20-Nov-05 10:30 
AnswerRe: How can I reference from a string to an objectname? Pin
serguey_haftrige20-Nov-05 14:11
serguey_haftrige20-Nov-05 14:11 
AnswerRe: How can I reference from a string to an objectname? Pin
Curtis Schlak.20-Nov-05 14:45
Curtis Schlak.20-Nov-05 14:45 
GeneralRe: How can I reference from a string to an objectname? Pin
Slerp21-Nov-05 8:44
Slerp21-Nov-05 8:44 
GeneralRe: How can I reference from a string to an objectname? Pin
Curtis Schlak.21-Nov-05 16:36
Curtis Schlak.21-Nov-05 16:36 
QuestionMFC application migration to C# Pin
jacka199920-Nov-05 8:01
jacka199920-Nov-05 8:01 
AnswerRe: MFC application migration to C# Pin
Judah Gabriel Himango20-Nov-05 8:20
sponsorJudah Gabriel Himango20-Nov-05 8:20 
AnswerRe: MFC application migration to C# Pin
Ray Cassick20-Nov-05 8:29
Ray Cassick20-Nov-05 8:29 
AnswerRe: MFC application migration to C# Pin
jacka199921-Nov-05 9:10
jacka199921-Nov-05 9:10 
QuestionC# Generics question Pin
gnjunge20-Nov-05 7:28
gnjunge20-Nov-05 7:28 
AnswerRe: C# Generics question Pin
André Ziegler20-Nov-05 7:52
André Ziegler20-Nov-05 7:52 
AnswerRe: C# Generics question Pin
Judah Gabriel Himango20-Nov-05 8:21
sponsorJudah Gabriel Himango20-Nov-05 8:21 
GeneralRe: C# Generics question Pin
gnjunge20-Nov-05 8:35
gnjunge20-Nov-05 8:35 
QuestionHow to fill a DataGrid by a DataSet's data Pin
ventomito20-Nov-05 5:55
ventomito20-Nov-05 5:55 

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.