how to track line number of a text file through coding?

  • Thread starter Sandeep Singh Sekhon
  • Start date
S

Sandeep Singh Sekhon

I am creating an application in which i am parsing an XML file. I want
to show that a certain XML Tag has error in the file on a certain line.
How can I keep track of line number in file and show it to the user. How
can i get line number through coding?


Thanks,
Sandeep
 
B

bruce barker \(sqlwork.com\)

if you use the XmlTextReader to parse the xml, just use the LineNumber
property.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,438
Messages
2,571,699
Members
48,796
Latest member
Greg L.
Top