Click here to Skip to main content
15,883,868 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.8K   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();

Views

Daily Counts

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