• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 477
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

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