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. General Programming
  3. C#
  4. MultilineTextBox to String...

MultilineTextBox to String...

Scheduled Pinned Locked Moved C#
questionhelptutorial
3 Posts 2 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.
  • M Offline
    M Offline
    Mschauder
    wrote on last edited by
    #1

    Hey Guys, how can I convert a Multiline textbox to a one lined string? textbox.text is: "A \r\n \t AB \r\n \t AC \r\n B" and so on... I want a string like that: "A AB AC B ..." I found the "MultilineStringConverter"- Class but I didn't understand how to use it... :confused: hope you can help me, greets :rose:

    R 1 Reply Last reply
    0
    • M Mschauder

      Hey Guys, how can I convert a Multiline textbox to a one lined string? textbox.text is: "A \r\n \t AB \r\n \t AC \r\n B" and so on... I want a string like that: "A AB AC B ..." I found the "MultilineStringConverter"- Class but I didn't understand how to use it... :confused: hope you can help me, greets :rose:

      R Offline
      R Offline
      R Giskard Reventlov
      wrote on last edited by
      #2

      Try something like:

      string text = textbox.Text.Replace("\r\n", string.Empty);

      Tychotics: take us back to the moon "Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars." H. G. Wells

      M 1 Reply Last reply
      0
      • R R Giskard Reventlov

        Try something like:

        string text = textbox.Text.Replace("\r\n", string.Empty);

        Tychotics: take us back to the moon "Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars." H. G. Wells

        M Offline
        M Offline
        Mschauder
        wrote on last edited by
        #3

        :zzz: god damn... I thought too complex :laugh: 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