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.
 
Back
Top