title: How to Remove '\0' from a string in C#?
body: <p>I would like to know how to remove '\0' from a string. This may be very simple but it's not for me since I'm a new C# developer.</p>
  
  <p>I've this code:   </p>
  
  <pre><code>public static void funcTest (string sSubject, string sBody)
  {
      Try
        {
          MailMessage msg = new MailMessage(); // Set up e-mail message.
          msg.To = XMLConfigReader.Email;
          msg.From = XMLConfigReader.From_Email;
          msg.Subject = sSubject;
          msg.body="TestStrg.\r\nTest\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\r\n";     
        }
      catch (Exception ex) 
        {
          string sMessage = ex.Message;     
          log.Error(sMessage, ex);   
        }
  }
  </code></pre>
  
  <p>But what I want is: </p>
  
  <pre><code>msg.body="TestStrg.\r\nTest\r\n";
  </code></pre>
  
  <p>So, is there a way to do this with a simple code?</p>