Click here to Skip to main content
15,888,401 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# test if number exists in array and if not put it in Pin
Islorvat30-Dec-09 8:47
Islorvat30-Dec-09 8:47 
GeneralRe: C# test if number exists in array and if not put it in Pin
Wheels01230-Dec-09 8:59
Wheels01230-Dec-09 8:59 
GeneralRe: C# test if number exists in array and if not put it in Pin
Alex Manolescu30-Dec-09 9:46
Alex Manolescu30-Dec-09 9:46 
GeneralRe: C# test if number exists in array and if not put it in Pin
#realJSOP30-Dec-09 9:48
mve#realJSOP30-Dec-09 9:48 
GeneralRe: C# test if number exists in array and if not put it in Pin
Alex Manolescu30-Dec-09 9:54
Alex Manolescu30-Dec-09 9:54 
GeneralRe: C# test if number exists in array and if not put it in Pin
#realJSOP30-Dec-09 23:45
mve#realJSOP30-Dec-09 23:45 
GeneralRe: C# test if number exists in array and if not put it in Pin
Alex Manolescu31-Dec-09 0:30
Alex Manolescu31-Dec-09 0:30 
AnswerRe: C# test if number exists in array and if not put it in Pin
Jimmanuel30-Dec-09 10:02
Jimmanuel30-Dec-09 10:02 
Wheels012 wrote:
Array.BinarySearch(numbers, 0, numbers.Length, intRnd);

It looks like you're just throwing random numbers (trying to, anyway) onto the end of the array, so how is this supposed to work if numbers is unsorted?

Like others have said, use a List and when adding to it insert items at their proper index to keep it sorted, or use a hash table.

Badger | [badger,badger,badger,badger...]
AnswerRe: C# test if number exists in array and if not put it in Pin
petercrab30-Dec-09 18:20
petercrab30-Dec-09 18:20 
GeneralRe: C# test if number exists in array and if not put it in Pin
Luc Pattyn31-Dec-09 0:24
sitebuilderLuc Pattyn31-Dec-09 0:24 
GeneralRe: C# test if number exists in array and if not put it in Pin
Alex Manolescu31-Dec-09 0:30
Alex Manolescu31-Dec-09 0:30 
GeneralRe: C# test if number exists in array and if not put it in Pin
Wheels01231-Dec-09 1:53
Wheels01231-Dec-09 1:53 
QuestionHow can I print-out my data in DataGridView using a printer? Pin
Emmet_Brown30-Dec-09 7:46
Emmet_Brown30-Dec-09 7:46 
AnswerRe: How can I print-out my data in DataGridView using a printer? Pin
sanforjackass30-Dec-09 8:13
sanforjackass30-Dec-09 8:13 
GeneralRe: How can I print-out my data in DataGridView using a printer? Pin
Emmet_Brown30-Dec-09 8:14
Emmet_Brown30-Dec-09 8:14 
QuestionI want to modify/replace some data from a binary file without loadig the file in memory. Pin
Alex Manolescu30-Dec-09 6:07
Alex Manolescu30-Dec-09 6:07 
AnswerRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
ProtoBytes30-Dec-09 6:39
ProtoBytes30-Dec-09 6:39 
GeneralRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
Alex Manolescu30-Dec-09 6:56
Alex Manolescu30-Dec-09 6:56 
GeneralRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
ProtoBytes30-Dec-09 7:07
ProtoBytes30-Dec-09 7:07 
GeneralRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
Alex Manolescu30-Dec-09 8:27
Alex Manolescu30-Dec-09 8:27 
GeneralRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
#realJSOP30-Dec-09 7:08
mve#realJSOP30-Dec-09 7:08 
GeneralRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
Alex Manolescu30-Dec-09 8:29
Alex Manolescu30-Dec-09 8:29 
AnswerRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
Luc Pattyn30-Dec-09 6:49
sitebuilderLuc Pattyn30-Dec-09 6:49 
GeneralRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
Alex Manolescu30-Dec-09 7:00
Alex Manolescu30-Dec-09 7:00 
GeneralRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
Luc Pattyn30-Dec-09 7:30
sitebuilderLuc Pattyn30-Dec-09 7:30 

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.