this looks correct. you told it to trim off all trailing characters the the
array ".trim"
every character in "test.trim" after "tes" is in the array of characters to
trim.
You would get the same thing if your string was
"test.trimmiiiirrrtt.t.t."
If youre trying to trim a certain string off the end dont use trim.
Maybe try EndsWith and SubString
"JohnMSyrasoft" wrote:
Hi,
Why am I getting unexpected results here? This is VB.NET 2005 from my
Immediate Window. See 2nd line.
?"test.trim".TrimEnd("trim".ToCharArray)
"test."
?"test.trim".TrimEnd(".trim".ToCharArray)
"tes"
?"test.trim".TrimEnd("t.trim".ToCharArray)
"tes"
?"test.trim".TrimEnd("st.trim".ToCharArray)
"te"
Any ideas if this is a bug or what?