Small question regarding Lists

Apr 26 2009 7:51 AM
Hi, I am wondering why running the last line of the following code, the element in j list is cleared? as my request was to clear i list and not j? why are they connected together? int x =5; int z=10; List i = new List (); List> j = new List>(); i.Add(x); i.Add(z); j.Add(i); i.Clear();

Answers (2)