title: Convert a number into the hex value in .NET
body: <p>I need to convert an integer number to the hex value. It will look like this:</p>
  
  <p><strong>0x0201cb77192c851c</strong></p>
  
  <p>When I do </p>
  
  <pre><code>string hex = int.ToString("x")
  </code></pre>
  
  <p>in C#, it returns </p>
  
  <pre><code>201cb77192c851c
  </code></pre>
  
  <p>How can I get the required result?</p>