Click here to Skip to main content
15,910,797 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: error message: index and length must refer to a location within the string Pin
riced15-Oct-10 1:11
riced15-Oct-10 1:11 
GeneralRe: error message: index and length must refer to a location within the string Pin
vijay248215-Oct-10 1:40
vijay248215-Oct-10 1:40 
GeneralRe: error message: index and length must refer to a location within the string Pin
riced15-Oct-10 4:20
riced15-Oct-10 4:20 
GeneralRe: error message: index and length must refer to a location within the string Pin
vijay248215-Oct-10 10:41
vijay248215-Oct-10 10:41 
AnswerRe: error message: index and length must refer to a location within the string Pin
Richard MacCutchan15-Oct-10 2:19
mveRichard MacCutchan15-Oct-10 2:19 
GeneralMessage Removed Pin
15-Oct-10 2:22
vijay248215-Oct-10 2:22 
GeneralRe: error message: index and length must refer to a location within the string Pin
Richard MacCutchan15-Oct-10 5:39
mveRichard MacCutchan15-Oct-10 5:39 
AnswerRe: error message: index and length must refer to a location within the string Pin
Luc Pattyn15-Oct-10 2:35
sitebuilderLuc Pattyn15-Oct-10 2:35 
so you get an exception at a specific line, and the message tells you startIndex and length don't fit the string you're working on. The ONLY logical next step is to have a look at the length of the string, and the values of startIndex and length.

startIndex and startIndex+length both must be in the range [0, stringLength] for obvious reasons. Go check it. And fix it. Don't tell me it works most of the time, I don't care. It has to work every time.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


QuestionWriting and saving a XML file? Pin
sanyexian14-Oct-10 19:46
sanyexian14-Oct-10 19:46 
AnswerRe: Writing and saving a XML file? Pin
DaveAuld14-Oct-10 20:48
professionalDaveAuld14-Oct-10 20:48 
GeneralRe: Writing and saving a XML file? Pin
sanyexian14-Oct-10 21:17
sanyexian14-Oct-10 21:17 
QuestionEquivalent code in access Pin
C#Coudou14-Oct-10 16:57
C#Coudou14-Oct-10 16:57 
AnswerRe: Equivalent code in access Pin
Estys15-Oct-10 2:51
Estys15-Oct-10 2:51 
AnswerRe: Equivalent code in access Pin
Simon_Whale15-Oct-10 3:03
Simon_Whale15-Oct-10 3:03 
GeneralRe: Equivalent code in access Pin
riced15-Oct-10 4:24
riced15-Oct-10 4:24 
QuestionVB.Net - Excel SaveAs box Pin
Central_IT13-Oct-10 4:56
Central_IT13-Oct-10 4:56 
AnswerRe: VB.Net - Excel SaveAs box Pin
phil.o13-Oct-10 5:02
professionalphil.o13-Oct-10 5:02 
GeneralRe: VB.Net - Excel SaveAs box Pin
JR21214-Oct-10 0:43
JR21214-Oct-10 0:43 
Questiondelete a record with foereign key reference Pin
waner michaud12-Oct-10 8:48
waner michaud12-Oct-10 8:48 
AnswerRe: delete a record with foereign key reference Pin
SilimSayo12-Oct-10 9:50
SilimSayo12-Oct-10 9:50 
AnswerRe: delete a record with foereign key reference Pin
David Mujica12-Oct-10 10:12
David Mujica12-Oct-10 10:12 
QuestionMS Powerpoint Counter Pin
Civic0612-Oct-10 2:50
Civic0612-Oct-10 2:50 
AnswerRe: MS Powerpoint Counter Pin
David Mujica12-Oct-10 3:06
David Mujica12-Oct-10 3:06 
QuestionConvert Vb.net Application into Web application Pin
vijay248211-Oct-10 21:20
vijay248211-Oct-10 21:20 
AnswerRe: Convert Vb.net Application into Web application Pin
Dave Kreskowiak12-Oct-10 1:47
mveDave Kreskowiak12-Oct-10 1:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.