double or single \\ in config file

  • Thread starter Thread starter daniel.serrano
  • Start date Start date
D

daniel.serrano

when writing to config file, should i use c:\\temp\\myapp.log or c:
\temp\myapp.log in the config file. It seems that all dotnetter say
to use the first, but the whole world doesn't create config files with
the first style. please help.
 
the "\\" way is safest way.
It also works in places where you could just use "\"

Windows Application config files require "\\"
Web.Config for Asp.Net will work just fine with "\" or "\\"
 
when writing to config file, should i use c:\\temp\\myapp.log or c:
\temp\myapp.log in the config file. It seems that all dotnetter say
to use the first, but the whole world doesn't create config files with
the first style. please help.

I just us a forward slash (/) instead. Windows will interpret it
correctly and you don't have to worry about escaping thing

Bill
 
when writing to config file, should i use c:\\temp\\myapp.log or c:
\temp\myapp.log in the config file. It seems that all dotnetter say
to use the first, but the whole world doesn't create config files with
the first style. please help.

Use the second one... you only need the first if you're hard coding a
string into your application.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top