Catalin, it really depends on how you are defining a line. There are many
different measures the most common of which is number of CarriageReturn or
Line Feeds. However, that's not an accurate measure for many industries, so
the number of characters divided by a set number of characters (for
instance, in Medical Transcription, it's common to have something like 65
characters equals a line). If it's the first, you CrLf's may not work b/c
of word wrap. However, one easy way to do it is to read the text in as a
String using a Stream Object, and then using a regex or counting routine to
count the number of line Breaks.
"Catalin Porancea" <ca**************@midwestern.net> wrote in message
news:uK**************@TK2MSFTNGP12.phx.gbl...
Thanks guys. Could somebody explain me how to read the file and get the
number of lines?
Thank you.
"Catalin Porancea" <ca**************@midwestern.net> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... Hello,
How can I get the file size in KB and the number of lines the file
contains in VB .Net?
Thank you.
Catalin