private static String genList(PlayList pl, String html_to_load, String order) { String html = "<ul>"; String static_html_element = new System.IO.StreamReader(html_to_load).ReadToEnd(); Dictionary<int, Song> toIterate; if (order.Equals("voteordered")) toIterate = pl.getVotedSongs(); else /* (order.Equals("unordered"))*/ toIterate = pl.getSongsByUid(); foreach (int uid in toIterate.Keys) { Song.mp3Head info = toIterate[uid].getMP3Info(); html += genListElement(uid, info, static_html_element); } html += "</ul>"; return html; }