Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Path.GetFileName(saveFileDialog1.FileName) As String

$
0
0
This crashes:
Dim filename As String = System.IO.Path.GetFileName(saveFileDialog1.FileName)
file.Save(filename)

This works fine:
Dim filename As String = System.IO.Path.GetFileName(saveFileDialog1.FileName)
Dim filename2 As String = "filename"
file.Save(filename2)

When the first crashes, however, and I check the string names in the output or "Autos", filename and filename2 match. What's the problem?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>