Click here to Skip to main content
16,007,760 members
Home / Discussions / C#
   

C#

 
QuestionHow can I reallocate memory of arrays in C#? Pin
hogan.smith16-Oct-07 18:31
hogan.smith16-Oct-07 18:31 
AnswerRe: How can I reallocate memory of arrays in C#? Pin
MohammadAmiry16-Oct-07 19:02
MohammadAmiry16-Oct-07 19:02 
GeneralRe: How can I reallocate memory of arrays in C#? Pin
hogan.smith16-Oct-07 19:05
hogan.smith16-Oct-07 19:05 
AnswerRe: How can I reallocate memory of arrays in C#? Pin
Ajay.k_Singh16-Oct-07 19:13
Ajay.k_Singh16-Oct-07 19:13 
GeneralRe: How can I reallocate memory of arrays in C#? Pin
hogan.smith16-Oct-07 19:18
hogan.smith16-Oct-07 19:18 
GeneralRe: How can I reallocate memory of arrays in C#? Pin
Ajay.k_Singh16-Oct-07 19:29
Ajay.k_Singh16-Oct-07 19:29 
GeneralRe: How can I reallocate memory of arrays in C#? Pin
hogan.smith16-Oct-07 19:35
hogan.smith16-Oct-07 19:35 
GeneralRe: How can I reallocate memory of arrays in C#? Pin
lmoelleb16-Oct-07 20:51
lmoelleb16-Oct-07 20:51 
ArrayList is something we used back in the old days before .NET got the necessary features to build collections. It's still there to support old code, but it's not something you should use for anything.

The current collections are based on Generics and are much better (still severely lacking, but evetything they lack ArrayList lacks as well). You will find them in System.Collections.Generics.

Using an Array for something where the size isn't static is inefficient - both to code and for the computer to execute. There is no excuse for it, it is simply not something you should ever do.

The bottom line is that this is not a choice between an Array or an ArrayList - neither should be used in this case. Use System.Collections.Generic.List<t>
GeneralRe: How can I reallocate memory of arrays in C#? Pin
hogan.smith16-Oct-07 22:16
hogan.smith16-Oct-07 22:16 
GeneralRe: How can I reallocate memory of arrays in C#? Pin
J4amieC16-Oct-07 22:22
J4amieC16-Oct-07 22:22 
GeneralRe: How can I reallocate memory of arrays in C#? [modified] Pin
lmoelleb16-Oct-07 22:51
lmoelleb16-Oct-07 22:51 
GeneralRe: How can I reallocate memory of arrays in C#? Pin
hogan.smith16-Oct-07 23:03
hogan.smith16-Oct-07 23:03 
GeneralRe: How can I reallocate memory of arrays in C#? Pin
J4amieC16-Oct-07 23:12
J4amieC16-Oct-07 23:12 
GeneralRe: How can I reallocate memory of arrays in C#? Pin
lmoelleb16-Oct-07 23:28
lmoelleb16-Oct-07 23:28 
GeneralRe: How can I reallocate memory of arrays in C#? Pin
J4amieC16-Oct-07 23:32
J4amieC16-Oct-07 23:32 
GeneralRe: How can I reallocate memory of arrays in C#? Pin
lmoelleb16-Oct-07 23:56
lmoelleb16-Oct-07 23:56 
GeneralRe: How can I reallocate memory of arrays in C#? Pin
Patrick Etc.18-Oct-07 8:14
Patrick Etc.18-Oct-07 8:14 
GeneralRe: How can I reallocate memory of arrays in C#? Pin
lmoelleb18-Oct-07 10:50
lmoelleb18-Oct-07 10:50 
AnswerRe: How can I reallocate memory of arrays in C#? Pin
Jeeva Jose16-Oct-07 21:49
Jeeva Jose16-Oct-07 21:49 
GeneralRe: How can I reallocate memory of arrays in C#? Pin
lmoelleb16-Oct-07 22:56
lmoelleb16-Oct-07 22:56 
QuestionClickOnce - How to download a group of files by force? Pin
Michael Sync16-Oct-07 17:55
Michael Sync16-Oct-07 17:55 
Questionsample code Pin
Trustapple16-Oct-07 17:45
Trustapple16-Oct-07 17:45 
AnswerRe: sample code Pin
Sandeep Kumar16-Oct-07 18:53
Sandeep Kumar16-Oct-07 18:53 
GeneralRe: sample code Pin
Trustapple16-Oct-07 19:21
Trustapple16-Oct-07 19:21 
QuestionMedia Player Question [modified] Pin
C# Beginner Nick16-Oct-07 17:31
C# Beginner Nick16-Oct-07 17:31 

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.