title: C# byte[] to String showing don't cut after '\0'
body: <p>I'm reading something from memory (in byte array) and then i want to convert it, but result is something like "wanteddata\0\0\0\0\0\0\0\0...". How can i cut it to "wanteddata"? I'm not sure of size that wanteddata will have so i gave maximum size: 14.
  The way i read from memory and convert:</p>
  
  <pre><code>        String w="";
          ReadProcessMemory(phandle, bAddr, buffer, 14, out bytesRW);
          w = ASCIIEncoding.ASCII.GetString(buffer);
  </code></pre>