Path's storing in config files?

Looking at a simple config entry :

What is the best practice decision when saving path's ? with trailing slash such as :

<add key="aaa" value="\\dsFileSrv\Documents\Public\RX\DATA\Source\"/>


<add key="aaa" value="\\dsFileSrv\Documents\Public\RX\DATA\Source"/>

p.s. I know I can use Path.Combine to eliminate this conflict.

But still , there must be a best-overall-decision as a starting point..


Let's see what the framework itself uses...




Therefore, I would say without trailing slashes.

edit Having said that, there is no real harm in including trailing backslashes if you are using Path.Combine, and as mentioned in the comments, it may communicate better that this is guaranteed to be a directory and not a file with no extension.

Need Your Help

Can't get jQuery UI modal dialog to be modal

javascript jquery jquery-ui

I can't get a jQuery UI modal dialog it to work as in the demo! Consider this recipe:

JavaFX: Scene Builder like a component?

java custom-controls javafx scenebuilder

is it possible to use a Scene Builder like a component? I would include an advanced wizard for creating custom layout and save configuration on file or is it better to create a custom one? Is there...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.