C#C
C#12mo ago
restock2009

Small Lists issue

im trying to check if a list remained the same after a prozess:
''' List<string> startList=previousList;
previousList.Add("item");
Console.Writeline(startList==previousList);
'''
This, according to me, should output false since the list was changed. However for some reason the "startList" is also changed simultaniously with the "previousList", eventhough I didn't use ".Add()" with "startList". Why does this happen and how can I fix it?
Was this page helpful?