Are Generic lists stored on the stack or the heap in C#?

Are Generic lists stored on the stack Or the heap?

example

//List of Ints
List<int> myInts = new List<int>();
myInts.Add(5);
myInts.Add(10);
myInts.Add(20);

Is myInts stored on the stack or the heap? If I add an int to the list, does boxing or unboxing occur?

7
задан George Stocker 13 September 2010 в 16:34
поделиться