Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
AnswerRe: What is the format of a SQLConnection connection string? Pin
Richard Deeming6-Jul-18 11:38
mveRichard Deeming6-Jul-18 11:38 
QuestionRtf Table Creating and Printing Pin
Member 117104825-Jul-18 20:49
Member 117104825-Jul-18 20:49 
AnswerRe: Rtf Table Creating and Printing Pin
Richard MacCutchan5-Jul-18 22:00
mveRichard MacCutchan5-Jul-18 22:00 
AnswerRe: Rtf Table Creating and Printing Pin
Eric Goedhart5-Jul-18 23:31
professionalEric Goedhart5-Jul-18 23:31 
QuestionMultiThreading help Pin
solutionsville5-Jul-18 6:05
solutionsville5-Jul-18 6:05 
AnswerRe: MultiThreading help Pin
Dave Kreskowiak5-Jul-18 6:29
mveDave Kreskowiak5-Jul-18 6:29 
GeneralRe: MultiThreading help Pin
solutionsville6-Jul-18 4:28
solutionsville6-Jul-18 4:28 
GeneralRe: MultiThreading help Pin
Dave Kreskowiak6-Jul-18 4:51
mveDave Kreskowiak6-Jul-18 4:51 
Well, this is definitely not a thread pool or "number of threads" issue. This is more of a data management and control problem.

That means, it seems like one thread is removing items from an array and another thread is asking for an item at an index that doesn't exist anymore.

The calls to Thread.Sleep lead me to believe that the code is poorly written in the first place. The Sleeps were put in there as a naive way of getting around a problem that the original coder didn't understand. Thread.Sleep should never be used in the code you've posted.

You said the problem shows up at updates.Add(qb.Query). I have no idea what that QueryBuilder class is and that seems like what would be throwing the exception.

The reference to updates.Add is just a List<string> and that will not throw the exception. The array bounds are managed internally by the List class and never fail like your exception describes.


modified 6-Jul-18 11:06am.

AnswerRe: MultiThreading help Pin
solutionsville10-Jul-18 2:59
solutionsville10-Jul-18 2:59 
AnswerRe: MultiThreading help Pin
OriginalGriff5-Jul-18 19:45
mveOriginalGriff5-Jul-18 19:45 
QuestionHow To solve Unity.Instance.Resolve(new ResolverOverride[] Pin
Member 110561804-Jul-18 4:56
Member 110561804-Jul-18 4:56 
AnswerRe: How To solve Unity.Instance.Resolve(new ResolverOverride[] Pin
Richard Deeming4-Jul-18 7:32
mveRichard Deeming4-Jul-18 7:32 
QuestionFilter records between two dates( using two datepicker) from text file in c# Pin
Mohamed Fahad M4-Jul-18 2:20
Mohamed Fahad M4-Jul-18 2:20 
AnswerRe: Filter records between two dates( using two datepicker) from text file in c# Pin
Pete O'Hanlon4-Jul-18 2:32
mvePete O'Hanlon4-Jul-18 2:32 
QuestionMaskedTextBox Focus ? Pin
ibrahimayhans3-Jul-18 1:42
ibrahimayhans3-Jul-18 1:42 
AnswerRe: MaskedTextBox Focus ? Pin
OriginalGriff3-Jul-18 2:19
mveOriginalGriff3-Jul-18 2:19 
GeneralRe: MaskedTextBox Focus ? Pin
ibrahimayhans3-Jul-18 2:33
ibrahimayhans3-Jul-18 2:33 
AnswerRe: MaskedTextBox Focus ? Pin
Eddy Vluggen3-Jul-18 2:31
professionalEddy Vluggen3-Jul-18 2:31 
GeneralRe: MaskedTextBox Focus ? Pin
ibrahimayhans3-Jul-18 2:34
ibrahimayhans3-Jul-18 2:34 
GeneralRe: MaskedTextBox Focus ? Pin
Eddy Vluggen3-Jul-18 2:37
professionalEddy Vluggen3-Jul-18 2:37 
AnswerRe: MaskedTextBox Focus ? Pin
Alan N3-Jul-18 3:29
Alan N3-Jul-18 3:29 
QuestionFollowing Jose Menendez Póo Calendar project Pin
Member 128234452-Jul-18 18:44
Member 128234452-Jul-18 18:44 
AnswerRe: Following Jose Menendez Póo Calendar project Pin
Peter_in_27802-Jul-18 19:34
professionalPeter_in_27802-Jul-18 19:34 
AnswerRe: Following Jose Menendez Póo Calendar project Pin
OriginalGriff2-Jul-18 20:51
mveOriginalGriff2-Jul-18 20:51 
AnswerRe: Following Jose Menendez Póo Calendar project Pin
Eddy Vluggen2-Jul-18 23:21
professionalEddy Vluggen2-Jul-18 23:21 

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.