little query re: how .net works with system memory..
i pass a list object to a method:
DoMyThing(myListObj);
public void DoMyThing(List<string> myListObj)
{
var a = myListObj;
}
in this scenario, is a
a 'copy' of, or a pointer to the myListObj?
to make this slightly different... here a dictionary say (assume of single item), and 'pick' something out of that object, does that copy data, or point to it?
DoMyThing(myDictObj);
public void DoMyThing(Dictionary<string, string> myDictObj)
{
var b = myDictObj.First().Value;
}
ultimate goal here is trying to make some of my code a bit more memory optimal.. there are situations where an object i send to a method can be ~100mb
thanks!