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. Visual Basic
  4. Writing text in next line

Writing text in next line

Scheduled Pinned Locked Moved Visual Basic
tutorialquestion
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.
  • A Offline
    A Offline
    Archana New to Dotnet
    wrote on last edited by
    #1

    Hi can any one please how to write text in next line of an existing file. I used below two methods.Itz getting appending at the last in the same line File.AppendAllText("My file path", text to write) (or) My.Computer.FileSystem.WriteAllText("My file path", Text to write, True) thanx in advance . Is the above good practice or using FSO object ?pls give me suggestions

    T R 2 Replies Last reply
    0
    • A Archana New to Dotnet

      Hi can any one please how to write text in next line of an existing file. I used below two methods.Itz getting appending at the last in the same line File.AppendAllText("My file path", text to write) (or) My.Computer.FileSystem.WriteAllText("My file path", Text to write, True) thanx in advance . Is the above good practice or using FSO object ?pls give me suggestions

      T Offline
      T Offline
      Tom Deketelaere
      wrote on last edited by
      #2

      put a 'vbCrLf' (=enter) before you're text to write File.AppendAllText("My file path", vbcrlf & text to write) My.Computer.FileSystem.WriteAllText("My file path", vbcrlf & Text to write, True) should work

      A 1 Reply Last reply
      0
      • T Tom Deketelaere

        put a 'vbCrLf' (=enter) before you're text to write File.AppendAllText("My file path", vbcrlf & text to write) My.Computer.FileSystem.WriteAllText("My file path", vbcrlf & Text to write, True) should work

        A Offline
        A Offline
        Archana New to Dotnet
        wrote on last edited by
        #3

        Thank you very much its working dude.

        1 Reply Last reply
        0
        • A Archana New to Dotnet

          Hi can any one please how to write text in next line of an existing file. I used below two methods.Itz getting appending at the last in the same line File.AppendAllText("My file path", text to write) (or) My.Computer.FileSystem.WriteAllText("My file path", Text to write, True) thanx in advance . Is the above good practice or using FSO object ?pls give me suggestions

          R Offline
          R Offline
          Rupesh Kumar Swami
          wrote on last edited by
          #4

          you can also use following statement File.AppendAllText("My file path", Controlchars.newline & text to write) My.Computer.FileSystem.WriteAllText("My file path", Controlchars.newline & Text to write, True)

          Rupesh Kumar Swami Software Engineer, Integrated Solution, Bikaner (India)

          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