Click here to Skip to main content
12,951,983 members (57,554 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 23 Oct 2011

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();


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...


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


About the Author

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

| | Privacy | Terms of Use | Mobile
Web02 | 2.8.170525.1 | Last Updated 23 Oct 2011
Article Copyright 2011 by Michael Freidgeim
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid