Alex Rivera | Logout

convert list<int> to list<long>

Asked 2010-07-21T02:52:51.390
16

How to convert List<int> to List<long> in C#?

Edit
Report

1 Answer

19
List<int> ints = new List<int>();
List<long> longs = ints.Select(i => (long)i).ToList();
answered 2010-07-21T03:21:46.187

Your Answer