All
Thanks for the replies, and apologies for the misleading subject line -
that's what multitasking on a Friday afternoon does for you.
>Can someone tell me why the following is considered bad coding practice,
please?
int n = 0;
int m = 1;
ArrayList list = new ArrayList();
list.Add(n);
list.Add(m);
It's not, particularly.
[..]
Perhaps you could give us more context for your question?
The question I asked was in an interview test for prospective .NET
developers that I was attempting. I am fairly new to .NET and C#, so I was
wondering if there was something that I was missing. Then only thing that I
could see was that with a fixed length collection such as this, one could
use a strongly typed Array ionstead of the ArrayList. From your responses it
seems that this is the correct answer.
Thanks!
--
Chris