CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    265

    [Resolved]String Manipulation

    Hi,

    I have a string like "a_b_c_d". How do I get only c out of this string?

    Thanks
    Last edited by shers; August 14th, 2011 at 04:58 PM.

  2. #2
    Join Date
    Sep 2006
    Posts
    31

    Re: String Manipulation

    you could do something like this:
    Code:
    Dim s As String = "a_b_c_d"
    
            Dim result = s.Split("_")(2)
            Console.WriteLine(result)

  3. #3
    Join Date
    Apr 2004
    Posts
    265

    Re: String Manipulation

    Thanks! This is what I finally did.

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

Featured