473,320 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Contents of a textfile into a single string?

MM
Hi,

Is there any way to read the contents of a textfile (<1024bytes) into a
single string (avoiding enumerating and concat)? Thanks, matthew.
Nov 17 '05 #1
3 1751

see the ReadToEnd file reader function

http://www.google.com/search?sourcei...f8&q=ReadToEnd

"MM" <mm@newsgroups.com> wrote in message
news:eS**************@TK2MSFTNGP14.phx.gbl...
Hi,

Is there any way to read the contents of a textfile (<1024bytes) into a
single string (avoiding enumerating and concat)? Thanks, matthew.

Nov 17 '05 #2
>Is there any way to read the contents of a textfile (<1024bytes) into a
single string (avoiding enumerating and concat)? Thanks, matthew.


StreamReader.ReadToEnd()

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 17 '05 #3
MM
Mattias Sjögren wrote:
Is there any way to read the contents of a textfile (<1024bytes) into a
single string (avoiding enumerating and concat)? Thanks, matthew.

StreamReader.ReadToEnd()

Mattias

Thanks to you both. matthew.
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: BjoernJackschina | last post by:
Hello, I just look for a capability to sort several words in view of alphabet. An example: stop is 'opst' reach is 'aechr' This should read in a new file so that I can look for same letter...
1
by: Michael Schindler | last post by:
Ich habe es nun erreicht, ein textfile einzulesen das nun zeile für zeile im datagrid angezeigt wird. Nun wäre es toll wenn ich das textfile zum beispiel nach jedem blank in eine spalte...
6
by: Poppy | last post by:
I use the following code to append a line of text to a text file : Dim myFILENAME As String = Server.MapPath("/ABACUS/cvdocs/" & fileName) Dim objStreamWriter As StreamWriter objStreamWriter =...
2
by: Keith Wilby | last post by:
A2003, XP Pro. I have a text box on a form. The text box is bound to a hyperlink field. I want to use the contents of the text box in code so I'm assigning the contents to a string variable. ...
2
by: arunaksha7 | last post by:
I am new to ASP.NET. I am facing a problem to import contents of a textfile to my ASP.NET Web Application datagrid.
0
by: lumo2000 | last post by:
hello ng! i wrote a little application in php which searches along a webpage for a latin animal name and returns me the "normal" name. so all i need to do now is: o - load a textfile and read...
0
by: ImanMan | last post by:
hi all , please am getting parts of a textfile into a richtextbox.i need a way so i can refresh the contents of that file every 10 seconds. can i used it through adding a clock and how? thanks a...
14
by: jehugaleahsa | last post by:
I have a rather complex need. I have a class that parses web pages and extracts all relevant file addresses. It allows me to download every pdf on a web page, for instance. I would like to...
1
by: asedt | last post by:
With my Excel macro and two text files I want to create a new textfile containing the first textfile then text from the sheet and then the second textfile. My problem is that i don't know how to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.