Implement Sort and Custom Enumerator in Generic List
page 2 of 7
by Satheesh Babu
Feedback
Average Rating: 
Views (Total / Last 10 Days): 43807/ 121

Things to Consider

To make things easily understandable I will use Customer object with Name and Age attributes as seen in Listing 1.

Listing 1 - Customer BO

class Customer
{
  private int _Age;
  private string _Name;
 
  public int Age
  {
    get
    {
      return _Age;
    }
    set
    {
      _Age = value;
    }
  }
  public string Name
  {
    get
    {
      return _Name;
    }
    set
    {
      _Name = value;
    }
  }
}

So the Generic list that can take Cutomer object can be defined as,

Listing 2 - Customer BO Generic List

 
List<Customer> cuslist = new List<Customer>();

View Entire Article

User Comments

Title: Comment box creation   
Name: Raghav
Date: 2011-11-01 1:43:04 PM
Comment:
I want to develop a comment box like face book in my website using ASP.net
Title: Mr   
Name: Banx
Date: 2010-10-06 6:59:59 PM
Comment:
With overload 2. Where does the comparecustomname method get the parameters from. its very confusing how it knows which parameters to use for the comparison.
Title: Implement Sort and Custom Enumerator in Generic List   
Name: Eric Ramírez
Date: 2010-04-09 11:58:27 PM
Comment:
The best article that i´ve found.

Thanks.
Title: Implement Sort and Custom Enumerator in Generic List   
Name: Saurabh
Date: 2008-12-25 12:16:29 PM
Comment:
Very nice explanation in a concise way...exactly to the point.
Title: Implement Sort and Custom Enumerator in Generic List   
Name: Michael
Date: 2008-04-12 10:30:13 PM
Comment:
Comprehensive and compact guide. And examples are actually working, in contrast to some MSDN articles
Title: Implement Sort and Custom Enumerator in Generic List   
Name: Wayde
Date: 2008-01-03 8:46:00 PM
Comment:
I have read a lot of stuff about custom enumeration and sorters and haven't understood any of it until I got to this article. Great Job! The article is concise, well organized, and the examples are fantastic.

Thank you.
Title: Implement Sort and Custom Enumerator in Generic List   
Name: Cheri
Date: 2008-01-03 3:02:25 AM
Comment:
cool article, learnt a lot of stuff from it






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2019 ASPAlliance.com  |  Page Processed at 2019-11-20 7:28:43 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search