How 'Console.Write("\0")' works?

  • Thread starter Thread starter calmzeal
  • Start date Start date
C

calmzeal

hey,guys, try this snipper(in c#):

Console.Write("The 1st string\0 string behind");
Console.Write("The 2nd string");

this codes writes 2 string, but the 1st string has been cut off by '\0'
then "string behind" will not shown in the console
but my qust is: why the console still didn't display "The 2nd string"?

thx,my env is framework 1.1,vs 2003
 
hey its displaying 2 strings.
u gave \0 i.e null so in that place its gaving space .that's it.
anyway its displaying 2 strings.
the ouput is:
The 1st string string behindThe 2nd string

Thanks.
 
Back
Top