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

File.Create Question

Join Date: Dec 2003
Posts: 55
Reputation: r0ckbaer is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 6
r0ckbaer r0ckbaer is offline Offline
Junior Poster in Training

Re: File.Create Question

  #2  
Sep 5th, 2005
// 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");
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 6: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