I am looking for a good programmatic way that I can use to refer to images in my bitmap [].
I am currently declaring a bunch of integers in my class
Bitmap[] mBmp = new Bitmap[6]
int image1 = 0, image2 = 1, image3 = 2, someimage = 3, otherimage = 4, yetanoimage = 5;
Then I refer to them as follows:
mBmp[someimage] ...
However, this is inefficient, and I would like to refer to them (preferably) according to their file name (minus the extension) or another unique identifier that can be programmatically determined.
The reason for this is that:
- number of images arbitrarily
- file names are arbitrary
- I want to automate the process as a template.
Hamid source
share