Select
private List<Foo> myOtherList = new List<Foo>();
becuse the other simply declares a link (which is set to null), the sample above declares a link to a list, creates a list and assigns this new list to a link.
Select
public List<Foo> ListOfFoo
{
get { return myList; }
set { myList= new List<Foo>(value); }
}
If you want myList to not return any changes that happen to the list after it is assigned to myList, for example.
List<string> myFirstList = new List<string>();
myFirstList.Add("Hello");
myFirstList.Add("World");
List<string> mySecondList = new List<string>(myFirstList);
myFirstList.Add("Boyo");
Select
public List<Foo> ListOfFoo
{
get { return myList; }
set { myList= value; }
}
, , .
List<string> myFirstList = new List<string>();
myFirstList.Add("Hello");
myFirstList.Add("World");
List<string> mySecondList = myFirstList;
myFirstList.Add("Boyo");
"" , , .