C# FAQ: Will Console.WriteLine() stop printing upon encountering a NULL character in a string?
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
| CSharp-Online.NET:FAQs |
| edit |
[edit]
Will Console.WriteLine() stop printing upon encountering a NULL character in a string?
C# strings are not terminated by null characters. Therefore, embedded nulls are permitted within strings. Consequently, Console.WriteLine() and similar methods will continue until a string is exhausted—until the string length is exceeded.