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. Show special signs in listbox

Show special signs in listbox

Scheduled Pinned Locked Moved C#
question
2 Posts 1 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.
  • S Offline
    S Offline
    Snowjim
    wrote on last edited by
    #1

    Hey! Consider the folowing string: string text = "This is a Test\r\nThere is nothing more to it that this\r\n"; If i show this in a list box the \r(CR) and \n(LF) will be switched to boxes!? Is there any way to show "\r" and "\n" where this signs('\n' and '\r') apare insted? Best Regards SnowJim

    S 1 Reply Last reply
    0
    • S Snowjim

      Hey! Consider the folowing string: string text = "This is a Test\r\nThere is nothing more to it that this\r\n"; If i show this in a list box the \r(CR) and \n(LF) will be switched to boxes!? Is there any way to show "\r" and "\n" where this signs('\n' and '\r') apare insted? Best Regards SnowJim

      S Offline
      S Offline
      Snowjim
      wrote on last edited by
      #2

      Hey! I have found out how to do: As long as '\r' and '\n' is counting as one char it will be handled as CR nad LF. By using this inData = inData.Replace("\r", "\x5C\x72"); inData = inData.Replace("\n", "\x5C\x6E"); The '\r and '\n' will be '\' + '\r and '\' + '\r'. Best Regards SnowJim

      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