SpecialDirectories.Temp Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets a path name pointing to the Temp directory.

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

public static string Temp { get; }

Property Value

Type: System.String

The path to the Temp directory.

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 for the Temp directory in a MessageBox.

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

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: