Click here to Skip to main content
15,889,281 members
Home / Discussions / C#
   

C#

 
QuestionsqlDataReader Thread Safe? Pin
michin127-Oct-03 11:01
michin127-Oct-03 11:01 
GeneralTimeZones in .Net Pin
Vadim Tabakman27-Oct-03 10:41
Vadim Tabakman27-Oct-03 10:41 
GeneralRe: TimeZones in .Net Pin
Heath Stewart27-Oct-03 11:07
protectorHeath Stewart27-Oct-03 11:07 
GeneralRe: TimeZones in .Net Pin
Vadim Tabakman27-Oct-03 11:14
Vadim Tabakman27-Oct-03 11:14 
GeneralRe: TimeZones in .Net Pin
Heath Stewart27-Oct-03 11:17
protectorHeath Stewart27-Oct-03 11:17 
Generalprogress bar to use on .net web client Pin
john51327-Oct-03 8:47
john51327-Oct-03 8:47 
GeneralRe: progress bar to use on .net web client Pin
Heath Stewart27-Oct-03 10:19
protectorHeath Stewart27-Oct-03 10:19 
GeneralArrayList and Binary Search Pin
RB@Emphasys27-Oct-03 8:26
RB@Emphasys27-Oct-03 8:26 
Alright,

My first born child to anyone who can sort me out. I have an ArrayList filled with objects called remotes. Remote is a struct, and in remote I wrote the CompareTo method to allow a binary search on the arraylist. This CompareTo method compares the remoteIDs, which is a field that I fill in as I populate the arraylist. The remoteID is from a database, it is unique, but not necessarily consecutive. So I may have three remotes in my arraylist of 30, 50, and 80. When I do a binary seach based on an object I populate, say I create a new remote, set its remoteID to 30, and do a binary seach on the arraylist, it works if the remoteID is close to the bounds of the array. So if the array length is 82, and my remote ID is 50, it finds the object and returns the index correctly. When I start getting nearer to the bounds of the array, say remote id equals 81, or even 85, being greater than the bounds of the array, it returns a negative number being one greater than the count of the array. So in this case a -83. Is it using the bounds of the array as min and max numbers, and therefore the algorithim bombs out do to the fact that my RemoteID numbers are outside those bounds? What can I do to resolve this issue? Any help offered would be greatly appreciated.

Thanks,
Ryan
GeneralRe: ArrayList and Binary Search Pin
Heath Stewart27-Oct-03 8:37
protectorHeath Stewart27-Oct-03 8:37 
GeneralRe: ArrayList and Binary Search Pin
RB@Emphasys27-Oct-03 9:05
RB@Emphasys27-Oct-03 9:05 
GeneralRe: ArrayList and Binary Search Pin
leppie27-Oct-03 8:38
leppie27-Oct-03 8:38 
GeneralRe: ArrayList and Binary Search Pin
Jeremy Kimball28-Oct-03 10:32
Jeremy Kimball28-Oct-03 10:32 
GeneralRe: ArrayList and Binary Search Pin
RB@Emphasys29-Oct-03 3:06
RB@Emphasys29-Oct-03 3:06 
GeneralActive X (ocx) into web project Pin
@LX27-Oct-03 7:25
@LX27-Oct-03 7:25 
GeneralRe: Active X (ocx) into web project Pin
Heath Stewart27-Oct-03 8:08
protectorHeath Stewart27-Oct-03 8:08 
GeneralHTML Processing in Windows Application Pin
Inam27-Oct-03 7:25
Inam27-Oct-03 7:25 
GeneralRe: HTML Processing in Windows Application Pin
Heath Stewart27-Oct-03 8:12
protectorHeath Stewart27-Oct-03 8:12 
Generalform object's constructor Pin
coolerbob27-Oct-03 6:30
coolerbob27-Oct-03 6:30 
GeneralRe: form object's constructor Pin
Heath Stewart27-Oct-03 6:39
protectorHeath Stewart27-Oct-03 6:39 
GeneralHelp richtextbox Pin
Wyetela27-Oct-03 6:08
Wyetela27-Oct-03 6:08 
GeneralActive X objct into web project Pin
@LX27-Oct-03 6:00
@LX27-Oct-03 6:00 
GeneralRe: Active X objct into web project Pin
Heath Stewart27-Oct-03 6:29
protectorHeath Stewart27-Oct-03 6:29 
QuestionThreading using the ref statement? Wha Happen? Pin
jremignanti27-Oct-03 5:23
jremignanti27-Oct-03 5:23 
AnswerRe: Threading using the ref statement? Wha Happen? Pin
Heath Stewart27-Oct-03 6:35
protectorHeath Stewart27-Oct-03 6:35 
GeneralRe: Threading using the ref statement? Wha Happen? Pin
jremignanti27-Oct-03 8:00
jremignanti27-Oct-03 8:00 

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.