Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with dividing a string
#6
Woops! So the problem here lies in the fact that when scanning through a list of objects, the last object is (.Length - 1), thus, in your for loop
[code2=vbnet]For i = 0 To (s.Length - remainder) Step 4[/code2]
You are scanning 1 object over the end of the array. To prevent this, you can simply tag on a "- 1". Like so:
[code2=vbnet]For i = 0 To (s.Length - remainder - 1) Step 4[/code2]
And that should fix everything, if not, let me know!

And the new VB.NET Syntax is as follows
Code:
[code2=vbnet]CODE[/code2]
My Blog | My Setup | My Videos | Have a wonderful day.


Messages In This Thread
Problems with dividing a string - by brco900033 - 10-19-2013, 12:09 PM
Re: Problems with dividing a string - by brandonio21_phpbb3_import2 - 10-26-2013, 07:02 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Search ListBox + Convert ListBox.item to string brco900033 3 14,574 09-13-2012, 03:03 PM
Last Post: brandonio21
  How to write string query on multiple lines kismetgerald 1 8,960 08-29-2012, 04:01 PM
Last Post: brandonio21
  VB.Net Query Builder Problems. Moldraxian 2 12,537 08-17-2012, 05:33 AM
Last Post: Moldraxian
  Outputting a string with quotation marks in it. openeXpressions 15 47,650 12-20-2011, 09:24 PM
Last Post: openeXpressions
  Problems with multiple textboxes and coding LearningVB2010 30 92,821 02-28-2011, 07:39 AM
Last Post: brandonio21

Forum Jump:


Users browsing this thread: 1 Guest(s)