2
Answers

Small question regarding Lists

bluescreen

bluescreen

15y
2.8k
1
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)
Next Recommended Forum