Results 1 to 1 of 1

Thread: String.TrimEnd() method only seems to work with the example

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2002
    Posts
    121

    String.TrimEnd() method only seems to work with the example

    this is the example from the helpfile and it works:
    Code:
    Dim MyString As String = "Hello, World!"
    Dim MyChar As Char() =  {"y"c, ","c}
    Dim NewString As String = MyString.TrimEnd(MyChar)
    Console.WriteLine(NewString)
    here is my code which is modeled exactly from the example. it doesn't work:
    Code:
    Dim MyString As String = "floorboards, "
            Dim MyChar As Char() = {"r"c, "o"c, "W"c, "l"c, "d"c, "!"c, " "c}
            Dim NewString As String = MyString.TrimEnd(MyChar)
            Console.WriteLine(NewString)

    i don't see what the problem w/ my code is.
    Last edited by Psychotron; May 2nd, 2002 at 04:17 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width