Creating a Generic Collection Class with Sorting Support in .NET 2.0(kylefinley.net)

submitted by salimsalim(780) 5 years, 2 months ago

One of the coolest new features in .NET 2.0 is the introduction of Generics. For those of you that have been creating tons of strongly typed collections for your business objects I'm sure you had the same reaction I did when you heard about them. "Sweet!! Now I can stop generating and tweaking derived collection classes all over the place!!" (This is assuming you've all been using some sort of refactoring tool that can generate the collection classes for you, I hope you have.) OK, so now we know we can create strongly typed collections in our code. You might be wondering why I'm suggesting we still create a separate collection class and not just use the generic collections included in the System.Collections.Generic namespace. The idea is that we can create our own collections that support generics that provide us with specific needs that we might commonly use or need for a specific application. In this article I will present a simple collection class which both supports Generics as well as Sorting.

add a comment |category: |Views: 100

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story