restock2009
Weird bug
In my current code-project happened something that I really dont understand.
When I ran the Code the first time, the process went a certain way.
However, when I added some "Console.WriteLine()" for guidance, this process changed and the result was diferent, eventhough no variables or logic were changed.
Why does this happen? I'm clueless.
(Sorry if the explanation was a but confusing, english isnt my first language)
4 replies
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?
4 replies