I'm working on a C# project where I must build paths to various files and folders. These are all under one root folder which I have specified in my Web.config file.
For example:
- "start with: "D:\builds\" from my Web.config
- Pass to GetRelativePath() to get "D:\builds\5.2\5.2.9751"
- Then pass to GetAutoSuitePath() to get "D:\builds\5.2\5.2.9751\AutoSuite\"
- Then pass to ParseBrLog which will read "D:\builds\5.2\5.2.9751\AutoSuite\AASanity.csv"
My paths are correct, but I just want to know what the best practice is for incomplete paths. Should I add a "\" to the end of every folder ("D:\Builds\5.2\" + "test.txt"), or add one to the start of every folder/file I add to the path ("D:\Builds" + "\5.2" + "\test.txt")? Currently, I'm, doing it both ways, and want to choose one uniform way of doing it.