String cannot contain embedded nulls?
Just looking at the docs for ModuleBuilder and it's method DefineType which takes a string amongst other parameters.
In the write up it states the parameter 'c开发者_如何学编程annot contain embedded nulls'.
What does that mean?
An example of a string with an embedded null is:
var example = "This is a null: \0";
'\0'
is the Unicode character 'NULL' (U+0000).
A string is not null terminated (ends on a null) so therefore you can actually store null characters ('\0') inside of a string. The string you are going to work with cannot have one of these special characters inside it.
Here is Microsoft's definition of string in reference to null characters:
http://msdn.microsoft.com/en-us/library/ms228362.aspx
精彩评论