SpecialDirectories.CurrentUserApplicationData Property

 

Gets a path name pointing to the Application Data directory for the current user.

Namespace:   Microsoft.VisualBasic.FileIO
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

public static string CurrentUserApplicationData { get; }

Property Value

Type: System.String

The path to the Application Data directory for the current user.

Exception Condition
DirectoryNotFoundException

The path is empty, usually because the operating system does not support the directory.

The SpecialDirectories object contains paths to commonly referenced directories.

This example displays the path to the Application Data directory for the current user in a MessageBox.

MsgBox(My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData)

EnvironmentPermission

Controls access to system and user environment variables. Associated enumeration: Unrestricted.

FileIOPermission

Controls the ability to access files and folders. Associated enumeration: Unrestricted.

.NET Framework
Available since 2.0
Return to top
Show: