Click here to Skip to main content
15,794,374 members
Home / Discussions / C#
   

C#

 
GeneralRe: visual source safe does not get correct file. Pin
arkiboys4-Jul-07 1:17
arkiboys4-Jul-07 1:17 
AnswerRe: visual source safe does not get correct file. Pin
Pete O'Hanlon4-Jul-07 1:32
subeditorPete O'Hanlon4-Jul-07 1:32 
GeneralRe: visual source safe does not get correct file. Pin
arkiboys4-Jul-07 1:46
arkiboys4-Jul-07 1:46 
GeneralRe: visual source safe does not get correct file. Pin
Pete O'Hanlon4-Jul-07 1:48
subeditorPete O'Hanlon4-Jul-07 1:48 
Questionuninstallation Pin
D2raghu4-Jul-07 0:37
D2raghu4-Jul-07 0:37 
AnswerRe: uninstallation Pin
Colin Angus Mackay4-Jul-07 0:57
Colin Angus Mackay4-Jul-07 0:57 
QuestionPreserving the old values in an array Pin
M. J. Jaya Chitra4-Jul-07 0:37
M. J. Jaya Chitra4-Jul-07 0:37 
AnswerRe: Preserving the old values in an array Pin
Colin Angus Mackay4-Jul-07 0:50
Colin Angus Mackay4-Jul-07 0:50 
M. J. Jaya Chitra wrote:
Can you please tell me how to preserve the existing values in an array while re-dimensioning.


I presume you mean resizing.

Arrays are not resizable in C# (nor in VB.NET, incidentally. It is a trick to allow you to think they are resizable).

If you need a resizable array use something like an ArrayList

But, if you do need to make the array bigger then create a new one, copy the values over, and then change your existing references to the new array. The old one will drop out of scope and be picked up by the garbage collector.


Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...

"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."

Ready to Give up - Your help will be much appreciated.


My website

GeneralRe: Preserving the old values in an array Pin
M. J. Jaya Chitra4-Jul-07 0:54
M. J. Jaya Chitra4-Jul-07 0:54 
GeneralRe: Preserving the old values in an array Pin
Dave Doknjas4-Jul-07 4:40
Dave Doknjas4-Jul-07 4:40 
Questionmerge Datasets Pin
kibromg4-Jul-07 0:27
kibromg4-Jul-07 0:27 
AnswerRe: merge Datasets Pin
J4amieC4-Jul-07 0:35
J4amieC4-Jul-07 0:35 
GeneralRe: merge Datasets Pin
kibromg4-Jul-07 0:52
kibromg4-Jul-07 0:52 
QuestionProblem with image button Pin
vamsimohan214-Jul-07 0:26
vamsimohan214-Jul-07 0:26 
AnswerRe: Problem with image button Pin
Michael Sync4-Jul-07 0:45
Michael Sync4-Jul-07 0:45 
GeneralRe: Problem with image button Pin
vamsimohan214-Jul-07 0:55
vamsimohan214-Jul-07 0:55 
GeneralRe: Problem with image button [modified] Pin
J4amieC4-Jul-07 2:50
J4amieC4-Jul-07 2:50 
Questionhow to get time to first byte. Pin
SakthiSurya4-Jul-07 0:26
SakthiSurya4-Jul-07 0:26 
QuestionProblem with image button Pin
vamsimohan214-Jul-07 0:24
vamsimohan214-Jul-07 0:24 
AnswerRe: Problem with image button Pin
J4amieC4-Jul-07 0:36
J4amieC4-Jul-07 0:36 
AnswerRe: Problem with image button Pin
Michael Sync4-Jul-07 0:43
Michael Sync4-Jul-07 0:43 
GeneralRe: Problem with image button Pin
vamsimohan214-Jul-07 0:58
vamsimohan214-Jul-07 0:58 
GeneralRe: Problem with image button Pin
J4amieC4-Jul-07 2:51
J4amieC4-Jul-07 2:51 
QuestionAnimation timing Pin
Jon Hulatt4-Jul-07 0:00
Jon Hulatt4-Jul-07 0:00 
AnswerRe: Animation timing Pin
Luc Pattyn4-Jul-07 1:56
sitebuilderLuc Pattyn4-Jul-07 1:56 

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.