RSS Forums RSS
Please support our C# advertiser: Programming Forums

File.Create Question

Join Date: Jul 2005
Location: FL.
Posts: 1,536
Reputation: tayspen is on a distinguished road 
Rep Power: 7
Solved Threads: 98
Colleague
tayspen's Avatar
tayspen tayspen is offline Offline
<Insert title here>

Re: File.Create Question

  #3  
Sep 5th, 2005
Originally Posted by r0ckbaer
// Creates a file called "test.txt" on the currently logged-in
// user's desktop
File.Create(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\testfile.txt");

// Or if you only want to find out the user that is currently logged in
String userName =  Environment.GetEnvironmentVariable("username");



Ok, Thank that was easy enough.


Thanks


-T
Firefox
Ewido
Tune up windows
Get detailed system information
My Fixes

Member - Alliance of Security Analysis Professionals - Since 2006
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 7:03 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC