C
C#17mo ago
Acorn

✅ Why is this expecting a char?

3 Replies
ero
ero17mo ago
because that's how it was defined
reflectronic
reflectronic17mo ago
if you're using .NET Framework, there's no version that just takes a string you either need to pass an array of strings (.Split(new[] { "\\" })), or because \ is just one character you can pass it as a character instead (.Split('\\')) the easiest way to do this is to not use string.Split for path manipulations and instead use Path.GetFileName(openFileDialog1.FileName)
Acorn
Acorn17mo ago
using Path.GetFileName was much easier!! i appreciate the help 🙂
Want results from more Discord servers?
Add your server
More Posts