ArrayList has an item(index) member. This shows up as an indexer in c#,
I'm not sure on the VB syntax. Maybe Item(index)?

-----Original Message-----
From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of
Scott Weston
Sent: Tuesday, May 21, 2002 2:17 PM
To: [EMAIL PROTECTED]
Subject: [DOTNET] C# arraylists

Is there a way to get a value out of an arraylist like in an indexed
array w/o enumerating?

Basically I want to choose a random value out of the list.

So what is the best method for doing this rather than

    loop until i = random_number - 1

        enumerate

    end loop
        get next value




 - Scott Weston -

IT Coordinator / Software Engineer
DISTek Integration, Inc.
[EMAIL PROTECTED]
319.266.7333x100



You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to