Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

ordered collection

 
   PDA (Home) -> Pocket PC - Developer RSS
Next:  How to avoid running program twice?  
Author Message
maz77

External


Since: Apr 09, 2008
Posts: 4



(Msg. 1) Posted: Thu Sep 24, 2009 6:25 am
Post subject: ordered collection
Archived from groups: microsoft>public>pocketpc>developer (more info?)

Hi,

I'm developing in C# and the problem I'm trying to solve it's quite
simple... Actually I'm using an Hashtable to store key-value pair, but I
need to keep the insertion order.
=====================================
Hashtable ht = new Hashtable();
ht.Add("First", 1);
ht.Add("Second", 2);
ht.Add("Third", 3);

foreach(string key in ht.Keys)
{
Console.Write(ht[key].toString());
}
====================================
I need a result like this:

1
2
3

I've seen that Hashtable doesn't keep the insertion order, and each
element is ordered by an HashCode... the only usefull object I've found
is Queue object, but I can't store key-value pair inside of it.

Please help.

Thanks (-:

MAX
Back to top
Login to vote
Display posts from previous:   
Related Topics:
ATL COM in eVC++: How to use STL Collection - Hi all, I'm developing an ATL COM dll in eVC++4 SP4 and the dll is meant to work with ASP. I'm having trouble with creating a collection object which will enable people to use For Each syntax in ASP. I've found a good reference on how to create the..

no easy way to get notified when the application is *reall.. - do you know an easy way to get notified when your application is *really* deactivated (and *really* activated)? when i mean by *really* is that the application is *really* deactivated when ALL its top-level windows (indluding its modal dialogs) are..

Question: Camera driver with DirectShow - Hello everybody, I am a beginner in writting drivers. Now I am writting the camera driver on Magneto. I have some questions, and I hope that you could give some advices to me. As we know, the new feature is that the camera co-work with DirectShow. (A)....

Data grid - Hello, I want to display a single row in a datagrid. but this row has 28 attributes and some of them are brief descriptions(2 to 3 lines). To display data nicely i want my grid to enlarge in height and not in width, so columns have a constant width..

Using INF file to create shortcuts on startmenu... - Hello all, I am trying to edit the inf file which VS.NET gens to add some shortcuts for my app. By default it adds a shortcut in the "Programs" screen, so if you go Start > Programs, you see it there. I would like to add a second shortcut...
       PDA (Home) -> Pocket PC - Developer All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
 Linux Forums
 Mac Forums
  PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact