title: Why does Path.Combine produce this result with a relative path?
body: <p>To my surprise, this code does not produce expected results:</p>
  
  <pre><code>var basePath = @"\\server\BaseFolder";
  var relativePath = @"\My\Relative\Folder";
  
  var combinedPath = Path.Combine(basePath, relativePath);
  </code></pre>
  
  <p>The result is <code>\My\Relative\Folder</code> instead of the expected <code>\\server\BaseFolder\My\Relative\Folder</code>.</p>
  
  <p>Why is this? What's the best way to combine relative paths that may or may not have a slash in them?</p>
  
  <p><strong>EDIT:</strong> I'm aware that I can just do string manipulation on <em>relativePath</em> to detect and remove a starting slash. Is there a safer way of doing this (I thought <code>Path.Combine</code> was supposed to be the safe way) that will account for backslashes and frontslashes?</p>