Imports System.IO
Module Module1
Sub Main()
Dim Current As String
Dim Root As String
Try
Current = Directory.GetCurrentDirectory()
Root = Directory.GetDirectoryRoot(Current)
Root = Directory.GetDirectoryRoot("\")
Console.WriteLine("Current directory {0}", Current)
Console.WriteLine("Root directory {0}", Root)
Catch E As Exception
Console.WriteLine("Error determining root directory")
Console.WriteLine(E.Message)
End Try
End Sub
End Module
|