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

C#

 
AnswerRe: C# test if number exists in array and if not put it in PinPopular
harold aptroot30-Dec-09 8:47
harold aptroot30-Dec-09 8:47 
GeneralRe: C# test if number exists in array and if not put it in Pin
Wheels01230-Dec-09 9:10
Wheels01230-Dec-09 9:10 
GeneralRe: C# test if number exists in array and if not put it in Pin
harold aptroot30-Dec-09 9:12
harold aptroot30-Dec-09 9:12 
GeneralRe: C# test if number exists in array and if not put it in Pin
harold aptroot30-Dec-09 9:10
harold aptroot30-Dec-09 9:10 
GeneralRe: C# test if number exists in array and if not put it in Pin
Luc Pattyn30-Dec-09 9:32
sitebuilderLuc Pattyn30-Dec-09 9:32 
AnswerRe: C# test if number exists in array and if not put it in PinPopular
Luc Pattyn30-Dec-09 8:47
sitebuilderLuc Pattyn30-Dec-09 8:47 
GeneralRe: C# test if number exists in array and if not put it in Pin
Wheels01230-Dec-09 8:58
Wheels01230-Dec-09 8:58 
GeneralRe: C# test if number exists in array and if not put it in Pin
Luc Pattyn30-Dec-09 9:12
sitebuilderLuc Pattyn30-Dec-09 9:12 
the problem with arrays of integers is, you don't have any "empty" positions, the array initially is filled with zeroes, which could also be valid inputs. the solution is to use some "elastic" collection, that grows when things get added (and even shrinks when things get removed again).


Wheels012 wrote:
Originally I had the array declaration in the method ... that would clear the array everytime


correct, whatever you use it should be initialized only once.


Wheels012 wrote:
I will look it up


good.
you may learn your code could shrink dramatically...

Smile | :)

Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

Merry Christmas and a Happy New Year to all.


GeneralRe: C# test if number exists in array and if not put it in Pin
PIEBALDconsult30-Dec-09 10:56
mvePIEBALDconsult30-Dec-09 10:56 
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 
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 

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.