hoping you can help me with this.
Okay I have two lists.
List1 - Gets the names of files without a path (so I can list the names on dynamically created buttons). More so for visual purposes only.
List2 - Stores the actual path to the file.
Now I have done List1.Sort(); and List2.Sort(). But being they are alphabetical, A direct path from C:/// is different than Hello.png. <(Just an example name)>
So the problem I am facing is, List1 and 2 aren't identical in where the actual elements are stored. (Which does make sense).
So is there a way to like sort List2 to match the same order as List1? Or vice versa.. So when I click the button, it loads the proper image,etc that it needs to.
List<Tuple<string, string>>where tuple Item1 is full path and item 2 is filename. Or, just save the full path into one list and rely inPath.GetFilename()to get the filename.Path.GetFileNameWithoutExtension(path);orPath.GetFileName(path);on items of your list to get the name of the file.List<Dictionary<string,string>>instead of two lists