I have some List:
List<int> list = new List<int> { 1, 2, 3, 4, 5 };
I want to apply some transformation to elements of my list. I can do this in two ways:
List<int> list1 = list.Select(x => 2 * x).ToList();
List<int> list2 = list.ConvertAll(x => 2 * x).ToList();
What is the difference between these two ways?