I want to combine two relative paths in C#.
For example:
string path1 = "/System/Configuration/Panels/Alpha";
string path2 = "Panels/Alpha/Data";
I want to return
string result = "/System/Configuration/Panels/Alpha/Data";
I can implement this by splitting the second array and compare it in a for loop but I was wondering if there is something similar to Path.Combine
available or if this can be accomplished with regular expressions or Linq?
Thanks