473,396 Members | 1,942 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,396 software developers and data experts.

C# Read and write one line from textfile

1
Hello, I'm trying to make an application with C# that writes and reads some lines of a text file, but I want to read one specific line and save the text in a string variable.
And the inverse process, save a string variable in a specific line of the text file.

Also i think that it could be done writing in the textfile "first= Here the text of the first line", "second= here the text of the second line"... and then, my application when want to read the first line, search the "first=" and read the text after =.

But I don't know do this :(

Thanks and sorry for my bad english.
Apr 9 '08 #1
0 1371

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: dmiller23462 | last post by:
Hi again guys.... This is my first source of help, by far the best ASP intellectual collective....Thanks in advance for any assistance...Anyway.... The forms I'm still working on (finishing...
2
by: Tim Bücker | last post by:
Hello. Is there a way to read a specified line in a textfile? Something like TextReader.ReadTextLine(4); It seems very odd to use reader.ReadLine(); reader.ReadLine(); reader.ReadLine();...
3
by: Krish | last post by:
I have requirement, that i get one big chunk of text file. This text file will have has information, that on finding "****End of Information****", i have to split them individual text file with our...
7
by: nonameisfree | last post by:
I am trying to get StartUp-Manager to write the grub password in encrypted form to menu.lst. Currently it writes the password in plain-text and that is not too clever... This is the function I...
8
friendjin
by: friendjin | last post by:
How can I read every line from the existed file. eg. the content of textfile: serialnumber = " 50"; serialfile path = "C:\\doc\\"; errorfile path = "C:\\doc\\d\\"; I want to read "50" from...
6
by: Kinbote | last post by:
Hi, I'm trying to make a function that opens a file, reads it in line by line, puts each line into an malloc'd array, and returns the array. I suspect I'm going about it in an atypical fashion, as...
2
by: RaviRajhulk | last post by:
I am trying to read folder and subfolder and print their name into a text file.I am able to read the folder and its content and write it to the textfile but I am not able to read the content of the...
6
by: Per Juul Larsen | last post by:
Hi. My Textfile looks like this Variable 1 Variable 2 Variable 3 Variable 4 On opening the application it will read the textfile, and assign each line of variable to at textfield in VB and...
3
by: =?Utf-8?B?RnJhbmsgVXJheQ==?= | last post by:
Hi all I am trying to loop a Textfile. This Textfile is located on a shared drive and it is used by another process. When I try to read it I get an exeption: The process cannot access the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.