Solved

Add to open ended array

Posted on 2003-10-23
4
398 Views
Last Modified: 2006-11-17
ok so if I create an array like this

obj[] array = new obj[];


how would I add values to this dynamically
0
Comment
Question by:jayrod
  • 2
  • 2
4 Comments
 
LVL 9

Expert Comment

by:msdixon
ID: 9609295
you can use an ArrayList
0
 
LVL 20

Accepted Solution

by:
TheAvenger earned 125 total points
ID: 9612448
obj[] array = new obj[];

is illegal code in C# - you have to specify a size. For dynamic arrays use ArrayList or any other collection from System.Collections, as msdixon already told you
0
 
LVL 9

Expert Comment

by:msdixon
ID: 9613971
hey, i gave that answer...
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 9613994
Actually I agree that msdixon deserved at least some of the points...
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question