What I would like to do is a list of all my uploaded images, which are in a folder of my application, this folder already contains images and I would like to put them in a list of labels, until now my code is as follows:
Code Listing Images:
DirectoryInfo d = new DirectoryInfo(@"C:\Users\NQ054\Videos\Presupuesto_Da\Imagenes\Febrero");
FileInfo[] Files = d.GetFiles("*.jpeg");
string str = "";
List<Label> labels = new List<Label>();
foreach (FileInfo file in Files)
{
str = str + ", " + file.Name;
Label label = new Label();
label.Text=file.ToString();
labels.Add(label);
}
If I debug it if you save an image by index in the list, but as I do so that the labels can be seen in my application, if there are 10 images they would be 10 labels.
Update
I only added the first tags, but what I want is that I add the 10 that I need for each image, those are in the list.
Code to add a tag:
this.Controls.Add(labelI);