image array

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

how would i declare and initialize a dynamic length array of images. I want
to add images to the array using the fromfile method.
 
Shayne,

In .NET 1.1 and before, you would use an ArrayList, and add the Images
to it as you needed. However, you would have to cast the results from the
ArrayList back to an image every time you used it.

In .NET 2.0, use the List<T> class, using Image for the type parameter
T, like so:

// Create the array of images.
List<Image> imageList = new List<Image>();

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top