C# Dictionary question
Hi, if i have a dictionary in C# defined like so:
Dictionary<string, List<int>> test;
and I do List<int> stringValue = test["string"];
is the resulting variable "stringValue" a copy of test["string"]
or the actual list ???3 Replies
A list is a reference type, so a reference to that list
We can easily check that, though
Angius
REPL Result: Success
Result: List<int>
Compile: 350.837ms | Execution: 32.600ms | React with ❌ to remove this embed.
thank you