[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Add to open ended array

Posted on 2003-10-23
4
Medium Priority
?
431 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 500 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

873 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