I have a problem getting the final file name in C #.
For instance:
If the user enters two file names:
"ASD". and "asd .."
or
"asd" and "asd" (two spaces)
then the method Path.GetFileNamereturns "asd.", "asd ..", "asd", "asd" (two spaces).
After saving to the hard disk (for example, using StreamWriter), there is only one "asd" file
How to check the final input file name? I believe there are many other examples, and I could never have done it correctly manually.
Edit
I use it to compare two file names and returns GetFileName: for a.txt - a.txt for A.txt - A.txt
But after saving, save the same file. The comparison should ignore the case.