Winston_D, T. wrote:
This does not seem to work.
What do you mean exactly?
Note: you usually don't need the
ref
keyword while passing objects, because they are already passed by reference (strictly speaking
a reference to the object is passed by value) hence, using
public class A
{
CustomDataClass DataObject;
public A(CustomDataClass MyCustomCreatedObject)
{
DataObject = MyCustomCreatedObject;
}
}
when you change
DatatObject state you actually change the state of the original object.