To combine two parts of a file path, you can do
System.IO.Path.Combine (path1, path2);
However, you can't do
System.IO.Path.Combine (path1, path2, path3);
Is there a simple way to do this?
Edit: I ended up using Aaron's helper method, but simplified it with Kha's advice:
public static string CombinePaths (params string [] paths)
{
if (paths == null)
throw new ArgumentNullException ("paths");
return paths.Aggregate (Path.Combine);
}