Copying variables from one picturebox to another without making them change with each other
问题 I would like to copy a picturebox to another picturebox, but I do not want them to change with each other. PictureBox picbox1 = new PictureBox(); PictureBox picbox2 = picbox1; picbox1.Visible = false; //The problem here is that picbox2.Visible will also become false I would like to make picbox1 change without changing picbox2 .... How would I be able to do that? 回答1: Probably the best way to maintain clean code is to create an extension method, also note that your second picturebox is