K
Kevin Smith
Hi,
According to the intellisense help, string.Trim() "Removes all occurances
or white space characters from the beginning and end of this instance."
However, the follow code does not appear to modify s.
s.Trim('\r');
While the follow code DOES modify s.
s = s.Trim(\r');
I understand that the help text quoted above is for the version of this
method that takes no arguments. But I would assume that variations of Trim
work the same fundamental way.
If this is modifying this instance, why do I only get the effect if I assign
the result?
Thanks.
According to the intellisense help, string.Trim() "Removes all occurances
or white space characters from the beginning and end of this instance."
However, the follow code does not appear to modify s.
s.Trim('\r');
While the follow code DOES modify s.
s = s.Trim(\r');
I understand that the help text quoted above is for the version of this
method that takes no arguments. But I would assume that variations of Trim
work the same fundamental way.
If this is modifying this instance, why do I only get the effect if I assign
the result?
Thanks.