title: Base 64 encoding in C#
body: <p>I have inherited some C# code. This code needs to upload a picture to a web service. This code saves the bytes of picture into <code>byte[]</code> called <code>ImageBytes</code>. To ensure the greatest portability, I want to first encode the <code>ImageBytes</code> into a base 64 encoded string. I believe the following code is doing that, however, I'm not sure. Can someone please verify if my assumption is correct?</p>
  
  <pre><code>StringBuilder sb = new StringBuilder();
  this.ImageBytes.ToList&lt;byte&gt;().ForEach(x =&gt; sb.AppendFormat("{0}.", Convert.ToUInt32(x)));
  </code></pre>
  
  <p>Is this code converting my <code>byte[]</code> into a base 64 encoded string? </p>
  
  <p>Thank you!</p>