[thelist] C#- using info from an arraylist

Lightning oktellme at earthlink.net
Sat Sep 9 07:49:59 CDT 2006


Sorry-

I was more expecting an acedemic answer. I am trying to learn c#. I have 
found plenty on the net on how to create arraylist, (details and examples) 
but only very terse statements like "use contains to get entry back", no 
details or examples on "contains".

I have put my code here for download:


http://www.yousendit.com/transfer.php?action=download&ufid=F861403C5E1895A9&rcpt=oktellme@earthlink.net

Laura



----- Original Message ----- 
From: "Robert Vreeland" <vreeland at studioframework.com>
To: <thelist at lists.evolt.org>
Sent: Friday, September 08, 2006 10:49 PM
Subject: Re: [thelist] C#- using info from an arraylist


> Can you post more of the code and error message, otherwise we can't really
> tell what is wrong.
>
>
> Sincerely,
> Robert Vreeland
> Managing Partner
> StudioFramework
>
> -----Original Message-----
> From: thelist-bounces at lists.evolt.org
> [mailto:thelist-bounces at lists.evolt.org] On Behalf Of Lightning
> Sent: Friday, September 08, 2006 10:00 PM
> To: thelist at lists.evolt.org
> Subject: [thelist] C#- using info from an arraylist
>
> Passenger arraylist contains START, END, DIRECTION where start and end are
> integers and direction is enum.
>
> I am looping thru arraylist, looking for instances where END = i , and if
> direction also matches, I will delete it.
>
> ELEVATOR
>
> foreach(Passenger intEndFloor in PassengersOnCar) //<< this line does not
> compile
>
> {
>
> if (intEndFloor == intFloor && dirDirection == Direction.Up)
>
> {
>
> // if passenger wants this floor, discharge
>
> PassengersOnCar.Remove(Passenger);  //<< this line does not compile
>
> intdischargedPassengers++;
>
> }
>
> }
>
>
>
> Can anyone help?
>
> thanks
>
> Laura
>




More information about the thelist mailing list