Directory.GetCurrentDirectory() : Directory « System.IO « VB.Net by API






Directory.GetCurrentDirectory()

  


Imports System.IO

Module Module1

    Sub Main()
        Dim Current As String
        Dim Parent As DirectoryInfo

        Try
            Current = Directory.GetCurrentDirectory()
            Parent = Directory.GetParent(Current)

            Console.WriteLine("Current directory {0}", Current)
            Console.WriteLine("Parent directory {0}", Parent.FullName)
        Catch E As Exception
            Console.WriteLine("Error determining parent directory")
            Console.WriteLine(E.Message)
        End Try
    End Sub

End Module

   
    
  








Related examples in the same category

1.Directory.CreateDirectory
2.Directory.Delete
3.Directory.Exists
4.Directory.GetDirectoryRoot
5.Directory.GetFileSystemEntries
6.Directory.GetLogicalDrives()
7.Directory.GetParent
8.Directory.Move
9.Directory.SetCurrentDirectory