I have a problem about C# file name. I show some pictures with PictureBox. Also I want to write picture’s name in a TextBox. I search fileinfo, directoryinfo, but it doesnt work.
List<Image> images = new List<Image>();
images.Add(Properties.Resources.baseball_bat);
images.Add(Properties.Resources.bracelet);
images.Add(Properties.Resources.bride);
pictureBox1.Image = images[..];
and i want to write baseball_bat, bride, bracelet etc. in a TextBox. What can I do? any offer?
This functionality is already built in…
Image lists store their images in a way that you can reference them by name and return the image.
Single use :
This returns the name of the image at the passed index
Store values for later on :
This returns a dictionary that references the index of picture to their string name in the image list.
Once again this is built in there is no need to try to extend funct. to it…