|
-
Nov 22nd, 2003, 09:11 PM
#1
Thread Starter
Lively Member
lines in a stream
I am trying to create an error trapper for my application. but for the part where I want it to log the error to a stream, I need to know how many lines are in the stream input so I write at the right place. basicly I want to count lines in a stream. any suggestions?
DannyJoumaa
Advanced VB6 Programmer
Intermediate-Advanced VB .NET Programmer
Intermediate C# Programmer
Intermediate Win32 Developer
Beginner Mac OS X Developer
Contact: [email protected]
Favorite Sayings:
"Every time you open your mouth, you prove your an idiot."
"God is a programmer. Satan is a bug. Life is debugging."
-
Nov 22nd, 2003, 09:49 PM
#2
Thread Starter
Lively Member
DannyJoumaa
Advanced VB6 Programmer
Intermediate-Advanced VB .NET Programmer
Intermediate C# Programmer
Intermediate Win32 Developer
Beginner Mac OS X Developer
Contact: [email protected]
Favorite Sayings:
"Every time you open your mouth, you prove your an idiot."
"God is a programmer. Satan is a bug. Life is debugging."
-
Nov 23rd, 2003, 03:25 AM
#3
if you want to count the lines in a Stream , you need to split the Stream by it's returns, eg:
VB Code:
[COLOR=blue]Dim[/COLOR] x [COLOR=blue]As Integer[/COLOR] = streamname.ReadToEnd().Split(Environment.NewLine).GetUpperBound(0)
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|