Solved

sorting objects in Array List

Posted on 2003-12-11
3
194 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
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.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now