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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Retreiving and displaying strings...

Retreiving and displaying strings...

Scheduled Pinned Locked Moved C#
questionhelp
4 Posts 3 Posters 1 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.
  • M Offline
    M Offline
    Mahi Ragava
    wrote on last edited by
    #1

    hi friends, Am having a paragraph which is like.... "Tic","Tac","Toe" "1","2","3" "12,"16","11" Here the first line strings Tic,Tac and Toe are fields... I have to retreive each of them seperately such that they have to be displayed in a multiline textbox as, Tic Tac Toe.... How can i do it?Kindly help me... Thanx -- modified at 4:22 Monday 12th December, 2005

    O 1 Reply Last reply
    0
    • M Mahi Ragava

      hi friends, Am having a paragraph which is like.... "Tic","Tac","Toe" "1","2","3" "12,"16","11" Here the first line strings Tic,Tac and Toe are fields... I have to retreive each of them seperately such that they have to be displayed in a multiline textbox as, Tic Tac Toe.... How can i do it?Kindly help me... Thanx -- modified at 4:22 Monday 12th December, 2005

      O Offline
      O Offline
      occcy
      wrote on last edited by
      #2

      i don't know whether i understand your question right...?! but if your string is "\"Tic\",\"Tac\","\Toe\"" you could use the Split method. string s="\"Tic\",\"Tac\","\Toe\""; string[] fields=s.Split(new char[]{','});

      M 1 Reply Last reply
      0
      • O occcy

        i don't know whether i understand your question right...?! but if your string is "\"Tic\",\"Tac\","\Toe\"" you could use the Split method. string s="\"Tic\",\"Tac\","\Toe\""; string[] fields=s.Split(new char[]{','});

        M Offline
        M Offline
        Mahi Ragava
        wrote on last edited by
        #3

        Hi friend, The same way i hav splitted...But i want to display those splitted strings line by line in a Multiline Textbox.. Like,(in a TextBox) Tic Tac Toe Thanx

        S 1 Reply Last reply
        0
        • M Mahi Ragava

          Hi friend, The same way i hav splitted...But i want to display those splitted strings line by line in a Multiline Textbox.. Like,(in a TextBox) Tic Tac Toe Thanx

          S Offline
          S Offline
          S Senthil Kumar
          wrote on last edited by
          #4

          If you've got the split strings, then just use the AppendText method to add them to the textbox. Rember to append System.Environment.NewLine to every split string, like

          multiLineTextBox.AppendText(splitString[i] + Environment.NewLine);

          Regards Senthil _____________________________ My Blog | My Articles | WinMacro

          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