TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
peasncarrots
NA
5
0
loop logic problems
Aug 23 2004 7:28 PM
Hello, I have hit a wall on this project and am looking for some guidance. I am setting up a sub to loop through a text based file and return various figures. I ahve managed to get the number of characters to return with this: Dim i As StreamReader = New StreamReader(strFile) strFile = i.ReadToEnd Dim intChar As Integer = 0 For j = 0 To strFile.Length - 1 intChar += 1 Next j NumberOfCharacters = intChar j = 0 Then when I try to get a value returned for the number of linefeeds in the file, I get the same number? Any ideas? my code: Dim chrFeed As String = ControlChars.Lf Dim intPara As Integer = 0 'This will loop through and count everytime the return(enter) key was struck. For Each chrFeed In strFile intPara += 1 Next NumberOfParagraphs = intPara Thanks for your help
Reply
Answers (
4
)
Hashtable arrays
Problems with System.DateTime.Parse