C#C
C#3y ago
Pacrombie

❔ C# Fundamental: does setting one object to another point or copy?

public SomeType someObject = new SomeType();
public SomeType anotherObject = someObject;


this is probably a braindead question but in this code, is anotherObject "pointing" to someObject (changing the instance variables of one will change the other's) or does anotherObject copy the values of someObject into a new object? im new to the language and trying to develop an understanding
Was this page helpful?