Can a string contain embedded zeros?

Just look at the docs for ModuleBuilder and its DefineType method , which takes a string among other parameters.

The entry says that the parameter “cannot contain embedded zeros”.

What does it mean?

+3
source share
2 answers

An example of a line with a built-in zero:

var example = "This is a null: \0";

'\0'is the Unicode character "NULL" (U + 0000) .

+6
source

The line does not end with zero (ends with null), so you can actually store null characters ('\ 0') inside the line. The line you are going to work with cannot contain one of these special characters.

Microsoft :

http://msdn.microsoft.com/en-us/library/ms228362.aspx

+1

All Articles