M
M
myrkonianin2018-07-05 15:51:26
C++ / C#
myrkonianin, 2018-07-05 15:51:26

How to read a piece of text from a file?

I am newbie. I need to read some text from the file strictly between the $BEGIN and $END lines , and a certain time at the end of the file. How can I do that?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
myrkonianin, 2018-07-05
@myrkonianin

I solved the problem using json file.

V
Victor P., 2018-07-05
@Jeer

First, read the file into a text variable.
Then, you can cut off the excess from this variable using
the Substring and IndexOf methods

F
freeExec, 2018-07-05
@freeExec

Take new StreamReader()which has a method ReadLine()and read until you find your lines.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question