Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
GeneralRe: Interop Pin
Daniel Turini25-Jul-03 11:21
Daniel Turini25-Jul-03 11:21 
QuestionHow do i check if the Left Shift key was pressed? Pin
CyberKewl25-Jul-03 2:09
CyberKewl25-Jul-03 2:09 
AnswerRe: How do i check if the Left Shift key was pressed? Pin
dynamic25-Jul-03 3:19
dynamic25-Jul-03 3:19 
Generalchecking time values Pin
draco_iii25-Jul-03 1:17
draco_iii25-Jul-03 1:17 
GeneralRe: checking time values Pin
Rocky Moore25-Jul-03 1:59
Rocky Moore25-Jul-03 1:59 
GeneralHash Table elements order Pin
michalJ25-Jul-03 0:23
michalJ25-Jul-03 0:23 
GeneralRe: Hash Table elements order Pin
Erick Sgarbi25-Jul-03 0:27
Erick Sgarbi25-Jul-03 0:27 
GeneralRe: Hash Table elements order Pin
Rocky Moore25-Jul-03 2:04
Rocky Moore25-Jul-03 2:04 
If for some reason you do not want to use a DataSet or DataTable as the other poster mentioned, you will have to use a combination collection. I had the same problem and solved it by deriving from an ArrayList and a private Hash table. I overrode the Add, Remove and Clear methods to allow be to handle both arrays. On the Add, I would call a base Add on the collection and then call a hash add with my key and the poistion of the object in the ArrayList. The this[] indexer I added with a string (mine was a text value for the key) and did a find using the hash and returned the reference from the base ArrayList by the index pulled from the hash table.

This allowed me to use the foreach on the collection to retrieve them in the order I placed them in the list but still allowed my fast access to an individual value based on the key.

Is simple to build and easy to use!

Rocky Moore <><
GeneralRe: Hash Table elements order Pin
Julian Bucknall [MSFT]25-Jul-03 8:30
Julian Bucknall [MSFT]25-Jul-03 8:30 
GeneralGetProcesses Pin
vikramlinux24-Jul-03 20:14
vikramlinux24-Jul-03 20:14 
GeneralRe: GetProcesses Pin
Alex Korchemniy25-Jul-03 9:18
Alex Korchemniy25-Jul-03 9:18 
GeneralRe: GetProcesses Pin
vikramlinux25-Jul-03 19:19
vikramlinux25-Jul-03 19:19 
GeneralWriting to a List box in a dirrerent form... Pin
eggie524-Jul-03 12:26
eggie524-Jul-03 12:26 
GeneralRe: Writing to a List box in a dirrerent form... Pin
Furty24-Jul-03 15:01
Furty24-Jul-03 15:01 
GeneralRe: Writing to a List box in a dirrerent form... Pin
eggie524-Jul-03 18:39
eggie524-Jul-03 18:39 
GeneralRe: Writing to a List box in a dirrerent form... Pin
eggie524-Jul-03 18:41
eggie524-Jul-03 18:41 
GeneralRe: Writing to a List box in a dirrerent form... Pin
eggie525-Jul-03 17:05
eggie525-Jul-03 17:05 
QuestionHow can you tell if an element in a datagrid has the focus? Pin
work_to_live24-Jul-03 12:05
work_to_live24-Jul-03 12:05 
AnswerRe: How can you tell if an element in a datagrid has the focus? Pin
work_to_live24-Jul-03 13:31
work_to_live24-Jul-03 13:31 
General2 projects 1 class Pin
albean24-Jul-03 10:45
albean24-Jul-03 10:45 
GeneralRe: 2 projects 1 class Pin
David Stone24-Jul-03 10:51
sitebuilderDavid Stone24-Jul-03 10:51 
GeneralRe: 2 projects 1 class Pin
albean24-Jul-03 11:06
albean24-Jul-03 11:06 
GeneralRe: 2 projects 1 class Pin
Daniel Turini24-Jul-03 11:13
Daniel Turini24-Jul-03 11:13 
GeneralRe: 2 projects 1 class Pin
David Stone24-Jul-03 11:46
sitebuilderDavid Stone24-Jul-03 11:46 
GeneralRe: 2 projects 1 class Pin
albean25-Jul-03 9:19
albean25-Jul-03 9:19 

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.