Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Index out of range exception error
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
amemoses




PostPosted: Sun Nov 01, 2009 10:32 pm   Post subject: Index out of range exception error

I need help handling Index outof range exception problem. It occur at the last line in this code
' Find and correct any "ei" where the preceding letter is not c
'
position = 0
Do While theInput.IndexOf("ei") <> -1
position = theInput.IndexOf("ei", position)
If theInput.Chars(position - 1).CompareTo(Convert.ToChar("c")) <> 0 Then
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: