Results 1 to 3 of 3

Thread: Remove String

  1. #1

    Thread Starter
    Addicted Member Stick's Avatar
    Join Date
    Aug 1999
    Location
    Iowa
    Posts
    152

    Remove String

    How can i remove the Last 3 char in a string?
    the string can change length..
    please help
    thanks

  2. #2
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Fort Collins, CO
    Posts
    366
    VB Code:
    1. Module Module1
    2.  
    3.     Sub Main()
    4.         Dim myString As String = "myString123"
    5.         Console.WriteLine(myString.Substring(0, myString.Length - 3))
    6.         Console.ReadLine()
    7.     End Sub
    8.  
    9. End Module

  3. #3

    Thread Starter
    Addicted Member Stick's Avatar
    Join Date
    Aug 1999
    Location
    Iowa
    Posts
    152
    thanks for your help
    I am learning vb.net one step at a time

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