how to copy a list to a new list, or retrieve list by value in c# how to copy a list to a new list, or retrieve list by value in c# asp.net asp.net

how to copy a list to a new list, or retrieve list by value in c#


List<MyType> copy = new List<MyType>(original);


I want to retrieve the list by value to be able to remove items before displaying them,

var newlist = oldList.Where(<specify condition here>).ToList();


If you are using .NET 3.5, the resulting array can have ToList() called on it.