Franz Wimmer February 2016
The C# compiler will replace
\u0000 by a null byte. That means, at execution time you will simply have only 7 characters in your memory.
If you don't want the compiler to replace the special char, you have to escape the backslash in the first place:
string characters = "abc\\u0000def";
Console.WriteLine(characters.Length); // Displays 12