how to increment an item array by 1 how to increment an item array by 1 pinkpoppy (Programmer) (OP) 14 Oct 13 13:28 I have an item array: A600 I need to increase it by 1 (A601). How do I increase it and have it shown in a textbox? Thanks RE: how to increment an item array by 1 Moregelen (Programmer) 14 Oct 13 14:10 If you need to be able to change the size you should really be using a List. Eg, instead of: CODE --> C#string ar = new string; ar = "blah"; ar = "blah blah"; .... You could do: CODE --> C#List<string> ar = new List<string>(); ar.Add("blah"); ar.Add("blah blah"); A list uses an array to store its data, so you get the speed of an array with the added benefit of dealing with a linked list.. which means you can add and remove items without worrying about the size. RE: how to increment an item array by 1 Moregelen (Programmer) 14 Oct 13 14:12 Plus, you can still access the elements of the List like you would the array. In the second example, ar would still return "blah blah" like in the first example. RE: how to increment an item array by 1 PeterDimitrov (IS/IT--Management) 14 Oct 13 20:04 Array.Resize(ref arr, 601); where arr is your array www.R-Tag.com Viewer and Scheduler for Crystal reports and SSRS. RE: how to increment an item array by 1 Moregelen (Programmer) 14 Oct 13 20:30 Keep in mind how one vs. the other works. An Array.Resize actually copies the existing array into a new array. While the List does this as well, it actually maintains excess capacity and then essentially tracks which index you're on. It only resizes once full, doubling capacity each time it does. If you're dealing with large sets of information where the array is going to need to expand (or contract) on the fly, you're considerably better off using a list; using an array resize each time you need to add a new index is considerably less efficient. If it's just a one off or you're dealing with small sets of data, I suppose it's fine, but you really should just use a List.