Dennis Hining
Member
- Joined
- Jun 7, 2021
- Messages
- 12
- Programming Experience
- Beginner
I know this is probably a pretty stupid question but I have never used the Console.Print before and am confused as to where the output of a
Console.Write (FileName)
. I run the code in the code window and see nothing on the screen.
Console Write:
Public Class Form1
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim OpenFileDialog1 As New System.Windows.Forms.OpenFileDialog
Dim lst As String
'**************************************************************************************************
With OpenFileDialog1
.Filter = "MP3 Files (*.mp3)|*.mp3|All Files (*.*)|*.*"
.FilterIndex = 1
End With
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
lst = OpenFileDialog1.FileName
Else
lst =
End If
Dim extension As String = Path.GetExtension(lst)
Dim filename As String = Path.GetFileName(lst)
Dim filenameNotExtension As String = Path.GetFileNameWithoutExtension(lst)
Dim root As String = Path.GetPathRoot(lst)
Dim c As Char()
Console.Write(filename)
Console.Write(root)
End Sub
End Class