Q

Generating classes like we did in VB6

I need to generate classes (for example, "employee") and collection classes (Employees collection of the employee class) in VB.NET as I could do in VB6. I should be able to use "for each" on the collection classes (for each employee in employees)

I could do this by using the sorted list collection, but the data is always sorted by the key (in this case I used employee ID.) I tried using the hashtable but it didn't work. Could you please let me know how to sort the data in the sorted list in a different manner? Or perhaps you know how to implement the same using a hashtable?

Take a look at the array list. It has a sort method allowing you to implement your own sort comparer so you can sort the list items in any order you would like. That should solve your problem right there.
This was first published in January 2005

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

SearchSOA

TheServerSide

SearchCloudApplications

Close