System.IO.Path.Combine Behavior
When using Path.Combine, you should be aware of the behavior that if the second parameter has a leading slash, it will ignore the first parameter.
Given the following:
string root = "c:\";string path = "test.txt";string lead = "\test.txt";
We get the following results:
using System.IO;
…Path.Combine(root, path);// ‘c:\test.txt’Path.combine(root, lead);// ‘\test.txt’