Share via


GetCurrentDirectory Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets the current working directory of the application.

Namespace:  System.IO
Assembly:  System.IO (in System.IO.dll)

Syntax

'Declaration
Public Shared Function GetCurrentDirectory As String
public static string GetCurrentDirectory()
public:
static String^ GetCurrentDirectory()
static member GetCurrentDirectory : unit -> string 
public static function GetCurrentDirectory() : String

Return Value

Type: System. . :: . .String
A string that contains the path of the current working directory, and does not end with a backslash (\).

Remarks

The current directory is distinct from the original directory, which is the one from which the process was started.

.NET Framework Security

See Also

Reference

Directory Class

System.IO Namespace