title: Is it ok to use slash for path in c# code
body: <p>I've been using Linux for years and because of the habit, I added <strong>/</strong> (slash) instead of <strong>\</strong> (backslash) for path to my c# code.</p>
  
  <pre><code>private const string X86DllPath = "x86/ShaferFilechck.dll"; // should use x86\\ShaferFilechck.dll
  private const string X64DllPath = "x64/ShaferFilechck.dll";
  
  [DllImport(X64DllPath, EntryPoint = "NalpLibOpen", CallingConvention = CallingConvention.Cdecl)]
  private static extern int NalpLibOpen_64(byte[] xmlParms);
  </code></pre>
  
  <p>The code works, but I'm wondering if c# translates slash to backslash when compiled and run on Windows. Is there some official documentation stating this or something.</p>
  
  <p>Could using / in path result in some unexpected behaviour under some circumstances.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I know the ultimate solution would be to use this, but I'm wondering why slash is still 'ok':</p>
  
  <pre><code>Path.Combine("x86", "ShaferFilechck.dll"); // x86\ShaferFilechck.dll
  </code></pre>