[Solved] File.Exists is working in C#, but doesn’t work in VB.NET


Try this way:

Dim stringData As String = GetFolderPath(SpecialFolder.MyDocuments) & "\my.exe" 'For example

            If Not String.IsNullOrEmpty(stringData) Then

                If File.Exists(stringData) Then

                    Process.Start(stringData)

                Else

                    MsgBox("File couldn't be found.", vbCritical, "MyApp")

                End If

            End If

solved File.Exists is working in C#, but doesn’t work in VB.NET