Passing Class into Container, Copy or Actual?

I am starting to make use of containers to make my code more reliable etc. In my main window I have a class with all the data etc for the item being worked upon.

I have a container which deals with the sale of the item. I want to pass many details of the item into the ‘Sale Details’ container, some of which I will want to amend/update whilst in the container.

My question is. If I pass the populated class into the container as a parameter, is the class in the ‘Sales Details’ container a copy of the main class or is it the actual data.

In other words, will the changes I make to the data whilst in the container be reflected in the main class (which is what I want) or is the class a separate copy once in the Sales container?

Many thanks

its the same object and objetcs can not copy itself.
if you change the object you need update the ui, if the ui change you need to update the object.
usually i have 2 methods for it.

You could however make a Clone method on your SaleDetail class which does make an exact copy.

Thanks guys, just what I needed. I actually want the object passed to the Sales container to be the actual data, not a copy. But its good to know about making a clone. Thank you!