Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. String Manupulation

String Manupulation

Scheduled Pinned Locked Moved ASP.NET
helptutorialquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jegastar
    wrote on last edited by
    #1

    Hi All, I have a string. I want to put all characters in an arraylist. How to do it? Help me. Regards, Jegastar

    G J 2 Replies Last reply
    0
    • J jegastar

      Hi All, I have a string. I want to put all characters in an arraylist. How to do it? Help me. Regards, Jegastar

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Use the ToCharArray method to get the string as an array of characters, then use that array in the call to the constructor when you create the ArrayList.

      --- b { font-weight: normal; }

      1 Reply Last reply
      0
      • J jegastar

        Hi All, I have a string. I want to put all characters in an arraylist. How to do it? Help me. Regards, Jegastar

        J Offline
        J Offline
        J4amieC
        wrote on last edited by
        #3

        This'll float ya boat im sure: a string is a list, it is simply a list of char's. You can access them in much the same way as any list string myString = "Hello World"; char char0 = myString[0]; // H char char3 = myString[3]; // l Also, as noted above you can use the ToCharArray() to get it as a simpler array to use elsewhere.

        --- How to get answers to your questions[^]

        J 1 Reply Last reply
        0
        • J J4amieC

          This'll float ya boat im sure: a string is a list, it is simply a list of char's. You can access them in much the same way as any list string myString = "Hello World"; char char0 = myString[0]; // H char char3 = myString[3]; // l Also, as noted above you can use the ToCharArray() to get it as a simpler array to use elsewhere.

          --- How to get answers to your questions[^]

          J Offline
          J Offline
          jegastar
          wrote on last edited by
          #4

          It is working!!!!!!!!Thank you.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups