Reading entire text file into a single variable
Reading entire text file into a single variable
Reading entire text file into a single variable
Reading entire text file into a single variable
Reading entire text file into a single variable
Reading entire text file into a single variable Reading entire text file into a single variable Reading entire text file into a single variable Reading entire text file into a single variable Reading entire text file into a single variable Reading entire text file into a single variable Reading entire text file into a single variable Reading entire text file into a single variable
Reading entire text file into a single variable Reading entire text file into a single variable
Reading entire text file into a single variable
Go Back  Xtreme Visual Basic Talk > > > Reading entire text file into a single variable


Reply
 
Thread Tools Display Modes
  #1  
Old 01-25-2005, 03:29 PM
stokeentertainm's Avatar
stokeentertainm stokeentertainm is offline
Contributor
 
Join Date: Jan 2005
Location: Stoke-on-Trent, UK
Posts: 439
Default Reading entire text file into a single variable


Hi all.

I need to load an entire text file into a single variable, modify it slightly, and then save then entire variable back as the text file. I can read/write line by line, but is there a way to do this in one go?

Thanks,

Matt.
Reply With Quote
  #2  
Old 01-25-2005, 04:14 PM
elnerdo's Avatar
elnerdo elnerdo is offline
Contributor
 
Join Date: Jul 2004
Location: Northern New Jersey
Posts: 490
Default

youreader.readtoend

But then again, you can always just use readline and put all the information on one line..
__________________
nerds unite!
Reply With Quote
  #3  
Old 01-26-2005, 05:46 PM
stokeentertainm's Avatar
stokeentertainm stokeentertainm is offline
Contributor
 
Join Date: Jan 2005
Location: Stoke-on-Trent, UK
Posts: 439
Default

Thanks, I've gone for the "one line" method and it works fine.

Is there a limit to the number of characters I can get in a string?

Matt.
Reply With Quote
  #4  
Old 01-27-2005, 05:12 PM
elnerdo's Avatar
elnerdo elnerdo is offline
Contributor
 
Join Date: Jul 2004
Location: Northern New Jersey
Posts: 490
Default

Yes, but it's pretty big
__________________
nerds unite!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Reading entire text file into a single variable
Reading entire text file into a single variable
Reading entire text file into a single variable Reading entire text file into a single variable
Reading entire text file into a single variable
Reading entire text file into a single variable
Reading entire text file into a single variable Reading entire text file into a single variable Reading entire text file into a single variable Reading entire text file into a single variable Reading entire text file into a single variable Reading entire text file into a single variable Reading entire text file into a single variable
Reading entire text file into a single variable
Reading entire text file into a single variable
 
Reading entire text file into a single variable
Reading entire text file into a single variable
 
-->