title: End of string in C#
body: <p>Do strings end with a <code>\0</code> character when being stored in the memory? How does a compiler know the end ??</p>
  
  <p>If it is true then</p>
  
  <pre><code>Console.WriteLine(str.LastIndexOf('\0'));
  </code></pre>
  
  <p>must return length, but the output is = -1</p>