I am facing a problem and i really cant get out of it, i tried to search for some solutions but ran out of all ideas.. So i am selecting a number of files all names are numbers example 1.png , 2.png 3.png etc etc What i want is that when loading 2.png i get the filename for example 2 ( excluding the extension) check for a condition for example and if else condition and store the output in another list. Is it possible ? The code below shows how im loading a file and another thing which i am doing ( basically getting the image and passign the image to another method.
OpenFileDialog x = new OpenFileDialog();
x.FileName = "";
x.Multiselect = true;
x.ShowDialog();
x.Title = "Images";
x.Filter = "Files|*.png";
string[] result = x.FileNames;
if (openFileDialog1.FileNames.ToString() != "")
{
foreach (string y in result)
{
img = new Bitmap(y);
ContoBin(img);
}
}