"Paez" <marco.pais@[IGNORE]gmail.com> a écrit dans le message de news:
(E-Mail Removed)...
| I have a Myclass[] obj1 that I will fill with some data but I do not know
| how much elements there will be. How can I declare it or resize it?
|
| Right now, I declare Myclass[] obj1=new Myclass[100]. Later, when I need
to
| show all elements, I do this:
|
| foreach (Myclass x in obj1)
| {
| if (x == null)
| continue;
| System.Console.WriteLine(x.ToString());
| }
|
| I don't thinks this is the best way.
If you are using .NET 1.1 then ArrayList is what you need.
In .NET 2.0, use a List<MyClass> generic list.
Joanna
--
Joanna Carter [TeamB]
Consultant Software Engineer