Click here to Skip to main content
16,013,747 members
Home / Discussions / C#
   

C#

 
AnswerLike following, simple Pin
Blue(Shanghai)25-Jun-06 23:53
Blue(Shanghai)25-Jun-06 23:53 
QuestionRe: Like following, simple Pin
Brendan Vogt26-Jun-06 0:03
Brendan Vogt26-Jun-06 0:03 
AnswerRe: Like following, simple Pin
Blue(Shanghai)26-Jun-06 0:08
Blue(Shanghai)26-Jun-06 0:08 
AnswerRe: Uploading and re-saving files Pin
Sushant Duggal25-Jun-06 23:57
Sushant Duggal25-Jun-06 23:57 
QuestionPlease Help. Pin
RedhaDev25-Jun-06 23:24
RedhaDev25-Jun-06 23:24 
AnswerRe: Please Help. Pin
J4amieC26-Jun-06 0:06
J4amieC26-Jun-06 0:06 
AnswerRe: Please Help. Pin
Garpo26-Jun-06 0:26
Garpo26-Jun-06 0:26 
QuestionUpdating Content of ArrayList Pin
harwanegg25-Jun-06 22:21
harwanegg25-Jun-06 22:21 
Hi there !

I want to store a list of System.Drawing.Rectangle objects in an ArrayList.
On action of user, the position of the Rectanlge objects should be changed.

Anyway, the collection is not updated when I use foreach in the Move function see below).

I guess the content of the arraylist is somehow protected, but what kind of dynamic list should I use instead ?

Thanks

ch




My code looks like this :

public class RectCollection
{
private ArrayList rects;

public RectCollection()
{
this.rects = new ArrayList();
}


public ArrayList Rects
{
get { return rects; }
set { rects = value; }
}

public void Add(Rectangle rect)
{
this.rects.Add(rect);
}

public void Move(int x, int y)
{
foreach (Rectangle rect in this.rects)
{
rect.Offset(x, y);
}
}


AnswerRe: Updating Content of ArrayList Pin
J4amieC25-Jun-06 22:59
J4amieC25-Jun-06 22:59 
QuestionFreeing unmanaged memory Pin
sbozcan25-Jun-06 21:34
sbozcan25-Jun-06 21:34 
QuestionSystem.Timers.Timer Exception Pin
Shajeel25-Jun-06 21:21
Shajeel25-Jun-06 21:21 
QuestionProgramming Pin
johnprakash25-Jun-06 20:57
johnprakash25-Jun-06 20:57 
AnswerRe: Programming Pin
Super Lloyd25-Jun-06 21:15
Super Lloyd25-Jun-06 21:15 
AnswerRe: Programming Pin
Robert Rohde26-Jun-06 0:03
Robert Rohde26-Jun-06 0:03 
AnswerRe: Programming Pin
Reza Raad26-Jun-06 1:25
Reza Raad26-Jun-06 1:25 
QuestionEmbed Images In Email Pin
Sushant Duggal25-Jun-06 20:45
Sushant Duggal25-Jun-06 20:45 
AnswerRe: Embed Images In Email Pin
ketankumar25-Jun-06 21:59
ketankumar25-Jun-06 21:59 
GeneralRe: Embed Images In Email Pin
Sushant Duggal25-Jun-06 23:35
Sushant Duggal25-Jun-06 23:35 
GeneralRe: Embed Images In Email Pin
ketankumar25-Jun-06 23:40
ketankumar25-Jun-06 23:40 
GeneralRe: Embed Images In Email Pin
Sushant Duggal25-Jun-06 23:53
Sushant Duggal25-Jun-06 23:53 
Questionis .net framework necessary Pin
foysal mamun25-Jun-06 20:34
foysal mamun25-Jun-06 20:34 
AnswerRe: is .net framework necessary Pin
stancrm25-Jun-06 21:06
stancrm25-Jun-06 21:06 
GeneralRe: is .net framework necessary Pin
foysal mamun25-Jun-06 21:45
foysal mamun25-Jun-06 21:45 
GeneralRe: is .net framework necessary Pin
stancrm25-Jun-06 22:04
stancrm25-Jun-06 22:04 
AnswerRe: is .net framework necessary Pin
Colin Angus Mackay25-Jun-06 22:53
Colin Angus Mackay25-Jun-06 22:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.