title: Convert string to hex-string in C#
body: <p>I have a string like &quot;sample&quot;. I want to get a string of it in <strong>hex format</strong>; like this:</p>
  <pre><code>&quot;796173767265&quot;
  </code></pre>
  <p>Please give the C# syntax.</p>