Click here to Skip to main content
15,914,160 members
Home / Discussions / C#
   

C#

 
QuestionGetting info from a Access database Pin
spepperchin14-Oct-06 18:59
spepperchin14-Oct-06 18:59 
QuestionGetting better memory performance Pin
kshet2614-Oct-06 16:40
kshet2614-Oct-06 16:40 
AnswerRe: Getting better memory performance Pin
Nader Elshehabi14-Oct-06 18:02
Nader Elshehabi14-Oct-06 18:02 
AnswerRe: Getting better memory performance Pin
leppie14-Oct-06 19:47
leppie14-Oct-06 19:47 
AnswerRe: Getting better memory performance Pin
Guffa15-Oct-06 1:17
Guffa15-Oct-06 1:17 
GeneralRe: Getting better memory performance Pin
kshet2615-Oct-06 8:00
kshet2615-Oct-06 8:00 
AnswerRe: Getting better memory performance Pin
Guffa15-Oct-06 12:12
Guffa15-Oct-06 12:12 
AnswerRe: Getting better memory performance Pin
Guffa15-Oct-06 14:52
Guffa15-Oct-06 14:52 
kshet26 wrote:
Thanks for your help. You have cleared a bunch of things up for me. I have one more question. If I initialize the ArrayList (ie ArrayList list = new ArrayList(100000000)) how do I assign values to those elements? I tried something like (list[0] = array) but I get a bunch of errors.

Thanks for your help,

Keith


You get errors because you try to assign values to items that does not exist.

If you specify a number when creating an ArrayList, that is only the initial capacity of the list. The list is still empty, you only tell it how large you expect the list to get, so that it can allocate that amount from the start.

Use the Add method to add the items to the ArrayList, just as I showed in the example.

If you read 100480507 items and use arrays with 1000 items, your ArrayList will only contain 100481 items.


---
b { font-weight: normal; }

AnswerRe: Getting better memory performance Pin
WillemM15-Oct-06 1:22
WillemM15-Oct-06 1:22 
QuestionWMI not working. Did I forget something? Pin
junus14-Oct-06 14:09
junus14-Oct-06 14:09 
AnswerRe: WMI not working. Did I forget something? Pin
Dave Kreskowiak14-Oct-06 19:31
mveDave Kreskowiak14-Oct-06 19:31 
QuestionListView SubItem Rollover Pin
smarttom9914-Oct-06 13:42
smarttom9914-Oct-06 13:42 
AnswerRe: ListView SubItem Rollover Pin
Nader Elshehabi14-Oct-06 14:20
Nader Elshehabi14-Oct-06 14:20 
GeneralRe: ListView SubItem Rollover Pin
smarttom9914-Oct-06 15:36
smarttom9914-Oct-06 15:36 
QuestionApplication freezes ... Pin
Jad Jadallah14-Oct-06 12:29
Jad Jadallah14-Oct-06 12:29 
AnswerRe: Application freezes ... Pin
Dave Kreskowiak14-Oct-06 19:29
mveDave Kreskowiak14-Oct-06 19:29 
AnswerRe: Application freezes ... Pin
S. Senthil Kumar15-Oct-06 7:31
S. Senthil Kumar15-Oct-06 7:31 
QuestionHow to go to next window Pin
Yustme14-Oct-06 11:03
Yustme14-Oct-06 11:03 
AnswerRe: How to go to next window Pin
Nader Elshehabi14-Oct-06 13:22
Nader Elshehabi14-Oct-06 13:22 
GeneralRe: How to go to next window Pin
Yustme14-Oct-06 22:46
Yustme14-Oct-06 22:46 
GeneralRe: How to go to next window Pin
sam#15-Oct-06 0:10
sam#15-Oct-06 0:10 
GeneralRe: How to go to next window Pin
Yustme15-Oct-06 0:31
Yustme15-Oct-06 0:31 
Questiondetecting keystrokes...How? Pin
TheCardinal14-Oct-06 3:44
TheCardinal14-Oct-06 3:44 
AnswerRe: detecting keystrokes...How? Pin
Nick Parker14-Oct-06 4:50
protectorNick Parker14-Oct-06 4:50 
GeneralRe: detecting keystrokes...How? Pin
TheCardinal14-Oct-06 6:45
TheCardinal14-Oct-06 6:45 

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.