471,570 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,570 software developers and data experts.

image array

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

--
shayneg
Jan 2 '06 #1
1 2360
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Shayne Garner" <Sh**********@discussions.microsoft.com> wrote in message
news:C7**********************************@microsof t.com...
how would i declare and initialize a dynamic length array of images. I
want
to add images to the array using the fromfile method.

--
shayneg

Jan 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by dave | last post: by
2 posts views Thread by Clas Hortien | last post: by
3 posts views Thread by Sandi | last post: by
7 posts views Thread by lgbjr | last post: by
8 posts views Thread by ctiggerf | last post: by
10 posts views Thread by =?Utf-8?B?UmludSBHb3BhbGFrcmlzaG5hIFBpbGxhaQ==?= | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Vinnie | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.