Click here to Skip to main content
15,885,767 members
Home / Discussions / C#
   

C#

 
GeneralIntercept incoming html Pin
lustuyck30-Jan-04 22:04
lustuyck30-Jan-04 22:04 
GeneralRe: Intercept incoming html Pin
Dmitriy Kostovetskiy31-Jan-04 9:23
Dmitriy Kostovetskiy31-Jan-04 9:23 
GeneralRe: Intercept incoming html Pin
Anonymous31-Jan-04 23:34
Anonymous31-Jan-04 23:34 
GeneralRe: Intercept incoming html Pin
Nick Parker1-Feb-04 7:28
protectorNick Parker1-Feb-04 7:28 
GeneralRe: Intercept incoming html Pin
Anonymous1-Feb-04 10:40
Anonymous1-Feb-04 10:40 
GeneralSearch pdf contents Pin
Mahesh Varma30-Jan-04 19:47
Mahesh Varma30-Jan-04 19:47 
GeneralTextbox.lines[] Pin
gsrajput30-Jan-04 17:03
gsrajput30-Jan-04 17:03 
GeneralRe: Textbox.lines[] Pin
Kentamanos30-Jan-04 20:15
Kentamanos30-Jan-04 20:15 
The first thing you should definitely do is figure out exactly which line is causing this exception to be thrown. Debug it and step thru it. Figure out exactly which line is throwing the exception. You could also catch the exception and inspect it inside the catch block (the Exception class contains a full stack trace in it that will tell you exactly which line threw the exception).

I'm almost positive it's the lines that say:
cmdArray[RowCommand,i] = Convert.ToInt32(GetInput[i]);

This appears to be the only place you could get an array out of bounds exception, because the GetInput array will be properly initialized by the Split command (and you're going from 0 to its length, which is perfectly legal). Is this cmdArray set to the Textboxes lines? If you don't know how big he array's going to be, consider using a collection of some sort that will allow you to add things at will.

One other comment...

The array creation in this line:

string [] GetInput = new string[4];

is pretty much not needed. The Split command will return an array, so you could just say:

string [] GetInput;

and let the Split command assign however big the actual array is. There's nothing special basically about initializing it to an array of 4 strings since it will be recreated when you do the Split.

That's about all I can help without seeing the rest of the code, but that should give you a good place to start looking.



I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.

-David St. Hubbins
GeneralRe: Textbox.lines[] Pin
Colin Angus Mackay31-Jan-04 1:36
Colin Angus Mackay31-Jan-04 1:36 
GeneralRe: Textbox.lines[] Pin
gsrajput31-Jan-04 4:38
gsrajput31-Jan-04 4:38 
GeneralHiding WinForm app from ALT-TAB Pin
gordingin30-Jan-04 15:47
gordingin30-Jan-04 15:47 
GeneralTypeInitializationException Pin
pahluwalia30-Jan-04 11:30
pahluwalia30-Jan-04 11:30 
GeneralRe: TypeInitializationException Pin
Broken God1-Feb-04 18:58
Broken God1-Feb-04 18:58 
GeneralRe: TypeInitializationException Pin
pahluwalia2-Feb-04 4:04
pahluwalia2-Feb-04 4:04 
QuestionHow to make print preview maximized? Pin
blakeb_130-Jan-04 10:51
blakeb_130-Jan-04 10:51 
AnswerRe: How to make print preview maximized? Pin
Heath Stewart30-Jan-04 10:58
protectorHeath Stewart30-Jan-04 10:58 
GeneralRe: How to make print preview maximized? Pin
blakeb_130-Jan-04 11:02
blakeb_130-Jan-04 11:02 
GeneralRe: How to make print preview maximized? Pin
Heath Stewart30-Jan-04 11:08
protectorHeath Stewart30-Jan-04 11:08 
GeneralRe: How to make print preview maximized? Pin
blakeb_130-Jan-04 11:11
blakeb_130-Jan-04 11:11 
GeneralRe: How to make print preview maximized? Pin
Tom Larsen30-Jan-04 11:31
Tom Larsen30-Jan-04 11:31 
GeneralMaximum value of an array Pin
crushinghellhammer30-Jan-04 9:37
crushinghellhammer30-Jan-04 9:37 
GeneralRe: Maximum value of an array Pin
Heath Stewart30-Jan-04 10:05
protectorHeath Stewart30-Jan-04 10:05 
GeneralRe: Maximum value of an array Pin
crushinghellhammer30-Jan-04 11:19
crushinghellhammer30-Jan-04 11:19 
GeneralRe: Maximum value of an array Pin
Heath Stewart30-Jan-04 11:36
protectorHeath Stewart30-Jan-04 11:36 
GeneralRe: Maximum value of an array Pin
crushinghellhammer30-Jan-04 11:59
crushinghellhammer30-Jan-04 11:59 

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.