Click here to Skip to main content
Click here to Skip to main content

Tagged as

Convert ArrayList to a Generic List

, 23 Oct 2011 CPOL
You can filter all elements of arrayList that can be cast to the same type using Enumerable.OfType(Of TResult) Method[^]. List typedList = arrayList.OfType().ToList();

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

24 Mar 2010
Mahmudul Haque Azad
1 alternative  
There is a short cut way to convert ArrayList to a generic list instead of looping through items.Generally this is what people do :omg: List orders = new List(myArrayList.count); foreach (WarriorTrading.Order order in myArrayList) { orders.add(order); }But this...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Michael Freidgeim
Software Developer (Senior)
Australia Australia
No Biography provided

| | Privacy | Mobile
Web01 | 2.8.141022.2 | Last Updated 23 Oct 2011
Article Copyright 2011 by Michael Freidgeim
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid