Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 8th, 2005, 06:30 AM
Registered User
 
Join Date: Oct 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Application path

Hi,

I know that Environment.CurrentDirectoryreturns the path of my application in the format "C:\Folder1\MyApp". How can I get the path in the format "C:\\Folder1\\MyApp" i.e. with a double "\".

Thanx

________________________
There is no patch for ignorance
 
Old October 8th, 2005, 07:31 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You can call Replace on the string returned from CurrentDirectory e.g.

Environment.CurrentDirectory.Replace("\\", "\\\\")

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Search for Application Path jmss66 VB How-To 1 July 2nd, 2008 03:30 PM
Need Help with path for loading Pics (app.path) Tabbasum Beginning VB 6 2 November 15th, 2007 04:57 AM
using app.path in database path and filename kd8con VB Databases Basics 2 October 25th, 2006 11:45 AM
The virtual path maps to another application deeptisingh20 ASP.NET 1.0 and 1.1 Basics 2 August 8th, 2006 07:05 AM
Getting the application path xgbnow Visual C++ 6 October 24th, 2003 06:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.