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. [Message Deleted]

[Message Deleted]

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

    [Message Deleted]

    D J 2 Replies Last reply
    0
    • M MS Lee

      [Message Deleted]

      D Offline
      D Offline
      Deresen
      wrote on last edited by
      #2

      What is the question?

      1 Reply Last reply
      0
      • M MS Lee

        [Message Deleted]

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

        I think what you're asking is how to read a text file in C#? If so, add a textbox control to your form and a button, then double-click on that button and enter the following code:

        StreamReader ReadFile = new StreamReader("C:\\MyTextFile.txt");
        textBox1.Text = ReadFile.ReadToEnd();
        ReadFile.Dispose();

        Now that you've got the code to read from a text file, you need to add a using to the top of your document, add the following line to the top of the page:

        using System.IO;

        Hope this helps dude. j.t.

        j.t.

        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