Click here to Skip to main content
15,881,841 members
Articles / Web Development / ASP.NET

A Dictionary Collection Sorting By Value

Rate me:
Please Sign up or sign in to vote.
4.25/5 (10 votes)
6 May 20042 min read 145K   228   40  
An article on creating a custom collection like the SortedList that sort entries by value instead of by key.
<%@ Page language="c#" Codebehind="DebugForm.aspx.cs" AutoEventWireup="false" Inherits="CustomCollection.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
	<head>
		<title>WebForm1</title>
		<meta name="GENERATOR" content="Microsoft Visual Studio 7.0">
		<meta name="CODE_LANGUAGE" content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
	</head>
	<body>
		<form id="Form1" method="post" runat="server">
			<asp:dropdownlist id="lstResults" runat="server"></asp:dropdownlist>
		</form>
	</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
South Africa South Africa

Comments and Discussions