Imports System
Imports System.IO
Public Class MainClass
Shared Sub Main()
Dim fileName As String
fileName = "test.vb"
If File.Exists(fileName) Then
Console.WriteLine( "File")
ElseIf Directory.Exists(fileName) Then
Console.WriteLine( "Directory")
Else
Console.WriteLine( "File for dir does not exist")
End If
End Sub ' Main
End Class
|