• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 439
  • Last Modified:

Add to open ended array

ok so if I create an array like this

obj[] array = new obj[];


how would I add values to this dynamically
0
jayrod
Asked:
jayrod
  • 2
  • 2
1 Solution
 
msdixonCommented:
you can use an ArrayList
0
 
TheAvengerCommented:
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
 
msdixonCommented:
hey, i gave that answer...
0
 
TheAvengerCommented:
Actually I agree that msdixon deserved at least some of the points...
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now