NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Environment.CurrentDirectory

Gets and sets the current directory. The original directory is the one from which the process was started.

[Visual Basic]
Public Shared Property CurrentDirectory As String
[C#]
public static string CurrentDirectory {get; set;}
[C++]
public: __property static String* get_CurrentDirectory();
public: __property static void set_CurrentDirectory(String*);
[JScript]
public static function get CurrentDirectory() : String;
public static function set CurrentDirectory(String);

Property Value

Get returns the current directory.

Set/Let is a string representing the fully qualified path of the current directory.

Exceptions

Exception Type Condition
ArgumentException The value passed to set is an empty string ("").
ArgumentNullException A null value or object is passed to set.
IOException An I/O error occurs.
DirectoryNotFoundException The value passed to set specifies a path that cannot be found.
SecurityException The caller does not have the appropriate permission.

Requirements

NGWS Runtime Security:

SecurityPermissionFlag Permission to use unmanaged code.
PermissionSet Full trust required.

See Also

Environment Class | Environment Members | System Namespace