Hello,
I have a program which pulls config information in from a file. The files length will vary depending on how many items are configured in the application. the application stores the config information in an array while reading the file. since the file's length varies the array must be dynamic after instantiated. From all the information I have found I know I can prep a dynamic array but I cannot find any info on instantiating it dynamically. All the info shows is instantanting the dynamic array to a static one. anyone have information on keeping the array dynamic
Either that or is there a way to determine how many lines in the file are left from the current Stream position It would have to be in lines, not characters.
Thanks for any help.
Quilnux

How can I Instantiate a dynamic array and still be dynamic after?
e. ogas
libra08
Thanks; very helpful.
For C#, you also need ref:
Array.Resize(ref YourArray, NewSize);
akin_l
Thanks. Works beautifully now.
Quilnux
jitendra badkas
While I agree with Brendan that the generic List is a better approach for you, .NET 2 (any language) does have a way to make an array resizable:
Array.Resize(YourArray, NewSize)
Although it is limited to one dimensional arrays.
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter, VB to C++ converter
Clear VB: Cleans up VB code
C# Code Metrics: Quick metrics for C#