Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » lambda C# 3.0 generics List convert cast   (RSS)
Sorry, but there are no more tags available to filter with.

Casting/converting generic List of a certain type into a List of another type in C#

Here’s an easy way to convert a generic List of a specific type to a List of another type. List < double > listOfDoubles = new List < double >() {1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9}; List < int > listOfIntegers = listOfDoubles.ConvertAll(doubleNumber
 
Page view tracker