Quantcast

Jump to content

Welcome to GameOn365
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

[VB] Reading Text Files

- - - - -

  • Please log in to reply
1 reply to this topic

#1
brarei200

brarei200

    Member

  • Members
  • 22 posts
  • :
Function
Private Function ReadTextFile(ByVal strFileLocation As String) As String
    	Dim srReader As New System.IO.StreamReader(strFileLocation)
    	Dim strContent As String = srReader.ReadToEnd
    	srReader.Close()
    	Return strContent
	End Function

Usuage
SomeObject = ReadTextFile("Location of Text File")
TextBox1.Text = ReadTextFile("C:\Desktop\File.txt")


#2
AOE

AOE

    Member

  • Members
  • 46 posts
  • Time Online: 49m 53s
Sweet man thanks for this one as well, You got any more source you would like to share? haha

Edited by Nick, 17 January 2011 - 05:30 AM.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users