C
C#2y ago
Acorn

✅ Why is this expecting a char?

3 Replies
ero
ero2y ago
because that's how it was defined
reflectronic
reflectronic2y 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
AcornOP2y ago
using Path.GetFileName was much easier!! i appreciate the help 🙂
Want results from more Discord servers?
Add your server