English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I created my own class to do this, and it's working well enough, but I suspect that this is not really the "proper" way to do it.
I've done some Google searches for them, but you know what a pain it can be to wade through the various programming forums and whatnot that it links you to.

2006-11-25 06:58:42 · 4 answers · asked by chemicalimbalance000 4 in Computers & Internet Programming & Design

4 answers

You should design in the bounds and limits. Otherwise, your program's array could grow to the maximum size and cause unwanted results.

Every program should be designed with limits, bounds and a user identifiable error condition and message. Otherwise, you will have CRAPPY software like that stuff that Microsoft sells.

Good luck and Happy Computing!

2006-11-25 07:02:36 · answer #1 · answered by Anonymous · 0 0

Look at the System.Collections.ArrayList - it is a collection class with a .ToArray() method. You can cast it to an array at the very last minute, after you've filled it with the items you want.

Using this method, you don't even have to think about the array depth or boundaries. The .ToArray() method takes care of all of it.

2006-11-25 15:10:41 · answer #2 · answered by evolver 6 · 1 0

I'm not sure what you're asking, but you can always declare a dynamic array and expand it as needed:

int[] myarray = new int[];

2006-11-25 15:27:44 · answer #3 · answered by Anonymous · 0 0

hey man if you found a way to make it work stick with it.if its not broke dont fix it.ok thats kind of cliche but i think that applies to this situation.

2006-11-25 15:01:30 · answer #4 · answered by Anonymous · 0 0

fedest.com, questions and answers