Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# Resize An Array
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01326722
Message ID:
01326724
Views:
18
>I wrote this code to store info coming from a text file. Each value in the txt file becomes an element in the array.
>
>
>string sFileName = Application.StartupPath + "\\A39442.txt";
>
>ArrayList aWords = new ArrayList();
>string sWord = "";
>
>StreamReader oFileReader = new StreamReader(sFileName);
>while ((sWord = oFileReader.ReadLine()) != null)
>{
>    if (sWord != "")
>    {
>        aWords.Add(sWord);
>    }
>}
>
>oFileReader.Close();
>
>
>
>Now I want to resize the array to be 2 dimensional, so I can insert another value describing each existing array element.
>
>Can someone show me how to do this please?

Kevin,

Check http://www.source-code.biz/snippets/csharp/1.htm

Hmmm, let me check http://sgdotnet.org/forums/thread/11145.aspx
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform