O
OvErboRed
It's possible to print out a string's Length property in my code like so:
string asdf = "asdf\0asdf";
Console.WriteLine(asdf); // = "asdf asdf"
Console.WriteLine(asdf.Length); // = 9
However if you try to use the VS.NET debugger's Watch to inspect this,
you'll see that asdf is displayed as "asdf" and asdf.Length is displayed as
4, not 9.
Now I can understand (though not approve of) the IDE's inability to display
the former correctly. However, why doesn't the IDE read from the actual
Length property of the asdf String object (and instead re-calculate the
length on its own)?
And will any of these problems be fixed?
string asdf = "asdf\0asdf";
Console.WriteLine(asdf); // = "asdf asdf"
Console.WriteLine(asdf.Length); // = 9
However if you try to use the VS.NET debugger's Watch to inspect this,
you'll see that asdf is displayed as "asdf" and asdf.Length is displayed as
4, not 9.
Now I can understand (though not approve of) the IDE's inability to display
the former correctly. However, why doesn't the IDE read from the actual
Length property of the asdf String object (and instead re-calculate the
length on its own)?
And will any of these problems be fixed?