How to get the path to the temporary folder?

Hello everybody,

a few days ago a friend asked me how to get the temporary folder of the current system.
So I decided to write a short post on my Blog.

Well if you want to get the temporary folder you can use the following code as an example

string tmp = Path.GetTempPath();

string tmp2 = Environment.GetEnvironmentVariable("TEMP");
//The two methods should return the same result

Regards
Michael

Advertisements
  1. Wow, I didn’t heard about that up to the present. Thanx!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: