Anjitha
Anjitha

Reputation: 85

Updating a rectangle list

Am drawing multiple rectangles in a windows form using graphics.DrawRectangle and is adding every rectangle to a rectangle list.later am editing the location a nd size of these rectangles.my doubt is whether i can edit the values of a rectangle in a rectangle list?

Upvotes: 0

Views: 739

Answers (1)

Ashkan Mobayen Khiabani
Ashkan Mobayen Khiabani

Reputation: 34180

You can do this:

Rectangle temp = RectList[0];
temp.Width = 100;
temp.Height = 100;
temp.X = 0;
temp.Y=0;
RectList[0] = temp;

Upvotes: 1

Related Questions