Würd ich auch so machen.
Hier noch ein kleines sample aus dem c# cookbook. #region "9.10 Sorting a Hashtable’s Keys and/or Values" public static void TestSortKeyValues() { // Define a hashtable object Hashtable hash = new Hashtable(); // hash.Add(2, "two"); // hash.Add(1, "one"); // hash.Add(5, "five"); // hash.Add(4, "four"); // hash.Add(3, "three"); hash.Add("2", "two"); hash.Add("1", "one"); hash.Add("5", "five"); hash.Add("4", "four"); hash.Add("3", "three"); // Get all the keys in the hashtable and sort them ArrayList keys = GetKeys(hash); keys.Sort(); foreach (object obj in keys) Console.WriteLine("Key: " + obj + " Value: " + hash[obj]); // Reverse the sorted key list Console.WriteLine(); keys.Reverse(); foreach (object obj in keys) Console.WriteLine("Key: " + obj + " Value: " + hash[obj]); // Get all the values in the hashtable and sort them Console.WriteLine(); Console.WriteLine(); ArrayList values = GetValues(hash); values.Sort(); foreach (object obj in values) Console.WriteLine("Value: " + obj); // Reverse the sorted value list Console.WriteLine(); values.Reverse(); foreach (object obj in values) Console.WriteLine("Value: " + obj); } public static ArrayList GetKeys(Hashtable table) { return (new ArrayList(table.Keys)); } public static ArrayList GetValues(Hashtable table) { return (new ArrayList(table.Values)); } #endregion > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Fichter, Julia > Sent: Friday, July 02, 2004 1:20 PM > To: [EMAIL PROTECTED] > Subject: AW: [Framework.net] Winforms - embedded ressourcen > > Hallo Liste, > > >>Ich habe in einem Projekt etliche Bilder in Form von embedded > >>ressourcen, die ich über folgende Schleife in einen > Bildarray einlese: > >> > >>foreach (string myfilename in myAssembly.GetManifestResourceNames()) > >> > >>Leider entspricht die Reihenfolge der Bilder keiner > nachvollziehbarer > >>Regel. Frage - was kann ich tun, damit die Bilder in einer > Bestimmten > >>Reihenfolge aus dem Assembly fliessen? > > >mir fällt zu dem Thema nichts sinnvolles ein. > > Kann man die Dateinamen nicht zuerst in eine Collection (z.B. > ArrayList) einlesen, dort sortieren und danach weiterverarbeiten? > > Gruß Julia > ########################################### > > This message has been scanned by F-Secure Anti-Virus for > Microsoft Exchange. > For more information, connect to http://www.F-Secure.com/ > _______________________________________________ > Framework.net Mailingliste, Postings senden an: > [EMAIL PROTECTED] > An-/Abmeldung und Suchfunktion unter: > http://www.glengamoi.com/mailman/listinfo/framework.net > _______________________________________________ Framework.net Mailingliste, Postings senden an: [EMAIL PROTECTED] An-/Abmeldung und Suchfunktion unter: http://www.glengamoi.com/mailman/listinfo/framework.net