Click here to Skip to main content
15,893,266 members
Articles / Programming Languages / C#

Convert ArrayList to a Generic List

Rate me:
Please Sign up or sign in to vote.
4.67/5 (2 votes)
23 Oct 2011CPOL 26.9K   1  
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();

Revisions


  

Compare Revision Minor Date Status Editor
3 - publicly available No 23-Oct-11 10:10 Available Deeksha Shenoy
2 No 22-Oct-11 17:48 Composing Andrew Rissing
1 No 22-Oct-11 15:17 Composing Michael Freidgeim

License

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


Written By
Software Developer (Senior)
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions