Friday, May 10, 2013

Assign a value to each element in Imagelist

You could use a Dictionary<int,string> instead (for details refer to http://msdn.microsoft.com/en-us/library/xfhwa508.aspx). It allowed you to map from a set of unique and freely selectable keys to a set of values (e.g. the file paths to your pictures):




Dictionary<int, string> pictures = new Dictionary<int, string>();
pictures.Add(1, "pic_file1.jpg");
pictures.Add(2. "pic_file2.jpg");
...

wizend

No comments:

Post a Comment