I want to change the value of pictureBox1.Location. And the result really confuses me!
Point player;
player = pictureBox1.Location;
player.X += 10; //it works
pictureBox1.Location.X += 10;//it doesn't work!! Why??
so I try this one :
pictureBox1.Location = player // it works
Could anyone tell me why? I only learnt c# for 1 week with head first c#, and I cannot find the answer through the Internet or the book.
Sorry, I didn't make my question clarified. I cannot build
pictureBox1.Location.X += 10 .
There is an error:
Cannot modify the return value of 'System.Windows.Forms.Control.Location' because it is not a variable
I want to know the difference between player.X and pictureBox1.Location.X