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

How to read textfile from particular line in c#?

45
Hi All,


Can u tell me how to read textfile from 15line or from particular line that means i have to ignore first 15 lines of textfile and i should start from 16th line.
Nov 30 '10 #1
2 2422
Frinavale
9,735 Expert Mod 8TB
NareshN,

What exactly are you having problems with?
Reading the file?
What have you tried so far to solve your problem?

-Frinny
Dec 6 '10 #2
Hi,

If i am right, you can create parsing zones in text files using comments. say you can haven this way

Line 1:
..
..
'User comment #START
Line 15:



Lline 120:
'User Comment #END

So during parsing line by line, need not to worry about line no 15 or XY, just start parsing after you hit #START and stop parsing once you hit #END. This way you could make it generic to suit any requirement.
Dec 8 '10 #3

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

Similar topics

5
by: Frank Grellert | last post by:
Hi, does anybody have an idea how to read a particular line of a file like awk's awk '{if( NR==12) print $0}' filename (reads lineno 12 of filename) thanks for your help Frank Grellert
5
by: Piotr | last post by:
I have a qestion about reading file in C++. How can I read a file line by line (i.e. putting a line ends wtih \n in a string) I tried the following, it does read the file, but it does not read...
35
by: RyanS09 | last post by:
Hello- I am trying to write a snippet which will open a text file with an integer on each line. I would like to read the last integer in the file. I am currently using: file = fopen("f.txt",...
3
by: duckness | last post by:
I have to make a program for school that's called four on a row! Probably you know it! Everything that has to work works! But I have one extra thing that doesn't work! You need the possibility to...
4
by: sudhakaranr | last post by:
HI, Need your help please... First thing, i want to open a directory and with in the directory i have 1000's of files and we need to read the file and i want a particular line which has...
3
by: prassaad | last post by:
HI! I 'm working on linux .I hv difficulty for picking particular line from a file... I like to make some manipulation on LINE such as 3 sda7 333333 66666 888888 444444 from file /PROC/DISKSTATS...
6
by: Lastknight | last post by:
Hi all I have googled and get the follwing expression for deleting the particular line of a perl program... perl -p -i -e"s/.*\n//" filename I am not able to understand the...
11
by: jo3c | last post by:
hi everybody im a newbie in python i need to read line 4 from a header file using linecache will crash my computer due to memory loading, because i am working on 2000 files each is 8mb ...
1
by: jitupatil2007 | last post by:
Hello every body i am new to this thread and i want to know how could i read a particular text or string from a text file or a csv file . plz help me its urgent thanking you in advance.
2
by: deenar | last post by:
Hi I'm having problems with Java in reading the next line in a text file to execute to find a solution. My program is read the data from the text file and excute it and provide the answer on the...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...

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.