title: C# Removing trailing '\0' from IP Address string
body: <p>I received a string over TCP socket. And this string looks something like this:</p>
  
  <pre><code>str = "10.100.200.200\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
  </code></pre>
  
  <p>How should I parse this into an IPAddress? If I do this, </p>
  
  <pre><code>IPAddress.TryParse(msg.nonTargetIP.Trim(), out ip);
  </code></pre>
  
  <p>it fails to parse.</p>
  
  <p>What is simplest way to remove those trailing null's? </p>