Solved

sorting objects in Array List

Posted on 2003-12-11
3
199 Views
Last Modified: 2010-04-16
hi i've an Array List "Mails" Whic Contains Set of bjects."Email".
The Email .Contais The Following Attributes
string Subject.
string From.
string Date.
If i Want To Sort this objects on Subjet or ,From or Date
or both Subject and From etc...
or on the three subject,from,date.
how this could be done.
"Note i'll increase the points to 50 ,till now i've only 20 point " 
0
Comment
Question by:hema3i
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 20

Expert Comment

by:TheAvenger
ID: 9919722
How do you want to use this array afterwards? Shall it be able to dinamically resort? Can you use the SortedList or it does not work for you?
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 9919971
In order to sort the elements, your EMail class must implement the IComparable interface, and you must supply the Compare methods necessary for the sort to be carried out.

AW
0
 
LVL 18

Accepted Solution

by:
testn earned 20 total points
ID: 9920311
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
.NET 2008 VB and C# 6 48
Expression Evaluater 3 46
Create a WebAPI using a generic return parameter 9 42
Adding where clause to entity statement c# 1 48
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question