title: How do you convert a string into base64 in .net framework 4
body: <p>So I've been going around the internet looking for a way to convert regular text(string) into base64 string and found many solutions. I'm trying to use:</p>
  
  <pre><code>Dim byt As Byte() = System.Text.Encoding.UTF8.GetBytes(TextBox1.Text)
  TextBox2.Text = convert.ToBase64String(byt)
  </code></pre>
  
  <p>but it end up with an error saying</p>
  
  <blockquote>
    <p>'ToBase64String' is not a member of 'System.Windows.Forms.Timer'. </p>
  </blockquote>
  
  <p>What do I do to fix this? Or if there's a better way to code it please help.</p>