I created a class called Colors. I am setting certain properties on the Colors object and setting it in a Session variable. When I access the Session variable on another page, I am noticing that if I change properties on objColors below, it changes the Session and does not keep the original properties which is what I want it to do. Here is an example:
Session["Colors"] = Colors;
Colors objColors = Session["Colors"];
//If I change objColors, it changes the Session. I don't want this to happen.
Is there a better way to keep retain the original properties? Why does it do this?