Click here to Skip to main content
15,913,487 members
Home / Discussions / C#
   

C#

 
AnswerRe: Color of label Pin
Luc Pattyn7-Mar-09 9:36
sitebuilderLuc Pattyn7-Mar-09 9:36 
GeneralRe: Color of label Pin
mrithula88-Mar-09 6:58
mrithula88-Mar-09 6:58 
AnswerRe: Color of label Pin
Luc Pattyn8-Mar-09 9:50
sitebuilderLuc Pattyn8-Mar-09 9:50 
QuestionInstalling application that queries FoxPro tables Pin
dptalt7-Mar-09 5:12
dptalt7-Mar-09 5:12 
QuestionHow to get the .exe file run after coying from a location to another location Pin
tyrone01097-Mar-09 2:52
tyrone01097-Mar-09 2:52 
AnswerRe: How to get the .exe file run after coying from a location to another location Pin
DaveyM697-Mar-09 3:08
professionalDaveyM697-Mar-09 3:08 
AnswerRe: How to get the .exe file run after coying from a location to another location Pin
sohighthesky8-Mar-09 5:08
sohighthesky8-Mar-09 5:08 
QuestionGUI Problem Pin
anishkannan7-Mar-09 2:13
anishkannan7-Mar-09 2:13 
AnswerRe: GUI Problem Pin
DaveyM697-Mar-09 2:28
professionalDaveyM697-Mar-09 2:28 
AnswerRe: GUI Problem Pin
ABitSmart7-Mar-09 3:28
ABitSmart7-Mar-09 3:28 
AnswerRe: GUI Problem Pin
Natza Mitzi8-Mar-09 9:58
Natza Mitzi8-Mar-09 9:58 
QuestionMultiple Record Insert Pin
shafiullah1237-Mar-09 1:19
shafiullah1237-Mar-09 1:19 
AnswerRe: Multiple Record Insert Pin
fly9047-Mar-09 8:23
fly9047-Mar-09 8:23 
QuestionChanging size of Array at Runtime Pin
nagendrathecoder7-Mar-09 1:11
nagendrathecoder7-Mar-09 1:11 
AnswerRe: Changing size of Array at Runtime Pin
Aghosh Babu7-Mar-09 1:19
Aghosh Babu7-Mar-09 1:19 
AnswerRe: Changing size of Array at Runtime Pin
nagendrathecoder7-Mar-09 1:24
nagendrathecoder7-Mar-09 1:24 
GeneralRe: Changing size of Array at Runtime Pin
Aghosh Babu7-Mar-09 1:30
Aghosh Babu7-Mar-09 1:30 
GeneralRe: Changing size of Array at Runtime Pin
nagendrathecoder7-Mar-09 1:34
nagendrathecoder7-Mar-09 1:34 
AnswerRe: Changing size of Array at Runtime Pin
Luc Pattyn7-Mar-09 1:42
sitebuilderLuc Pattyn7-Mar-09 1:42 
Hi,

In all .NET languages one-dimensional arrays can be resized, see the Array.Resize() method in the documentation. "This method allocates a new array with the specified size, copies elements from the old array to the new one, and then replaces the old array with the new one."

When you need to resize an array several times, or if you just don't know what size to choose at the start, you are probably better off choosing another kind of collection. The old ArrayList still exists, but it is better to use a generic list (that's List<T> ) which provides type checking and better performance. These collections grow and shrink dynamically without copying their content [ADDED] all the time (in the current implementation they grow by rounding up their capacity to the next power of 2 and copying only then).[/ADDED]

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


modified on Sunday, June 12, 2011 9:13 AM

GeneralRe: Changing size of Array at Runtime Pin
harold aptroot7-Mar-09 3:21
harold aptroot7-Mar-09 3:21 
AnswerRe: Changing size of Array at Runtime Pin
Luc Pattyn7-Mar-09 3:38
sitebuilderLuc Pattyn7-Mar-09 3:38 
QuestionHow to save application settings in .net C# CF? Pin
Aghosh Babu7-Mar-09 1:01
Aghosh Babu7-Mar-09 1:01 
AnswerRe: How to save application settings in .net C# CF? Pin
Natza Mitzi8-Mar-09 10:14
Natza Mitzi8-Mar-09 10:14 
GeneralRe: How to save application settings in .net C# CF? Pin
Aghosh Babu8-Mar-09 18:26
Aghosh Babu8-Mar-09 18:26 
GeneralRe: How to save application settings in .net C# CF? Pin
Natza Mitzi8-Mar-09 22:48
Natza Mitzi8-Mar-09 22:48 

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.