GUI VB.Net Tutorial

Imports System.Windows.Forms
public class FileOpenDialogFilter
   public Shared Sub Main
        Dim openFileDialog1 As System.Windows.Forms.OpenFileDialog
        openFileDialog1 = New System.Windows.Forms.OpenFileDialog()
        
        openFileDialog1.Filter = "Word (*.doc) |*.doc;*.rtf|(*.txt) |*.txt|(*.*) |*.*"
        If openFileDialog1.ShowDialog() = DialogResult.OK Then
            Console.WriteLine(openFileDialog1.FileName)
        End If
   End Sub
End class