3 Replies
because that's how it was defined
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)
using Path.GetFileName was much easier!! i appreciate the help 🙂