\r\n\r\n
Go Back  Xtreme Visual Basic Talk > Visual Basic .NET (2002/2003/2005/2008, including Express editions) > .NET File I/O and Registry > Reading entire text file into a single variable


\r\n \r\n
 
 
Thread Tools Display Modes

\r\n\r\n\r\n
Hi all.
\r\n
\r\nI 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?
\r\n
\r\nThanks,
\r\n
\r\nMatt.
\r\n \r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n Reply With Quote\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n'; pd[931221] = '\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n \r\n
\r\n
\r\n  \r\n #2  \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n Old\r\n \r\n 01-25-2005, 04:14 PM\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
elnerdo\'s Avatar\r\n\r\n
\r\n \r\n elnerdo\r\n elnerdo is offline\r\n\r\n\r\n
Prev Previous Post   Next Post Next
  #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: 436
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
 


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
 
 
-->