tags:

views:

199

answers:

3

Hi

How I can make Picture array ?

How to insert picture and how to see any picture in the Array ?

thank's in advance

+1  A: 

Are you talking about Image List?

Provides methods to manage a collection of Image objects

Shoban
A: 

The Image List as suggested by @Shoban is also good. Alternately you can create an array of Image or Bitmap objects. If you want to access images by index or randomly then array is goo. If you want to access images by name or some key/tag then you can use IDictionary object like this:

IDictionary<string, System.Drawing.Image> images = 
        new Dictionary<string, System.Drawing.Image>();

images.Add("Avtara",Image.FromFile("Path to your image"));

//to use
images["Avtara"];
TheVillageIdiot
A: 

if you would like to have only a array/list of images? you can use a generic list of images.

List<System.Drawing.Image> imageList = new List<System.Drawing.Image ();
imageList.Add(Image.FromFile("filename"));
imageList.Add(Image.FromFile("filename"));
imageList.Add(Image.FromFile("filename"));

foreach (System.Drawing.Image image in imageList){
   // e.g. show the image in the form
}
Tch