The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
Path.GetTempPath Method ()
.NET Framework (current version)
Returns the path of the current user's temporary folder.
mscorlib (in mscorlib.dll)
public static string GetTempPath()
The path to the temporary folder, ending with a backslash.
The caller does not have the required permissions.
This method checks for the existence of environment variables in the following order and uses the first path found:
The path specified by the TMP environment variable.
The path specified by the TEMP environment variable.
The path specified by the USERPROFILE environment variable.
The Windows directory.
The following code shows how to call the GetTempPath method.
string result = Path.GetTempPath();
Return to top
Universal Windows Platform
Available since 10
Available since 1.1
Available since 2.0
Windows Phone Silverlight
Available since 7.0