Results 1 to 3 of 3

Thread: [RESOLVED] ok i want to put all the text of a .txt file into a Dimmed String, how do i do that?

  1. #1

    Thread Starter
    Fanatic Member Emcrank's Avatar
    Join Date
    Jan 2009
    Posts
    566

    Resolved [RESOLVED] ok i want to put all the text of a .txt file into a Dimmed String, how do i do that?

    Title says it all, I want to put a .txt files TEXT into a Dimmed String. How?
    Dim TempStorage As String
    TempStorage = FilePath.Text.ReadAllText

    Something like that?

  2. #2
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: ok i want to put all the text of a .txt file into a Dimmed String, how do i do th

    To read the file into a string that is not an array you call ReadAllText. If you want an array you call ReadAllLines.
    vb.net Code:
    1. Dim textContents As String = IO.File.ReadAllText("C:\path\file.txt")

  3. #3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width