In a C-style string, the NULL character means "end of string". The
object will display all characters untill the NULL character is found. But it doesn't mean the next characters are not stored or lost.
foo += 'a';
foo += 'b';
foo += '\0';
foo += 'c';
foo += 'd';
char c = foo;
char d = foo;
int l = foo.GetLength();
In the above code, the debugger will display
for the foo variable, however,
But if you want to store a block of memory somewhere, I suggest not to use
class. Use a byte or char array instead (
for example, or regular arrays).