Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

C# web application using an array instead of a database table

Posted on 2007-10-01
1
Medium Priority
?
243 Views
Last Modified: 2008-01-09
I have an application that I have built and my code behind is generating an interface and part of that interface there is a number location. I want to display about 20 different instances of this interface and each instance to have a specific number. There is no pattern with these numbers they are random numbers. I know I could store these numbers in a one column table and loop through each record and display the interface with the number for each record. but I don't ahve access to a database for this application so I figure I would use an array (this is a temporary project).
So how do I implement an single column array in C#. Below is a sample of the array I would like to use.
How in my code would I loop through each 'record' in the array while looping and displaying an instance of the interface with the 'number' from the array

2
4
5
7
8
22
33
34
66
77
99
120
0
Comment
Question by:chicabow
1 Comment
 
LVL 7

Accepted Solution

by:
photowhiz earned 200 total points
ID: 20001612
int[] numbers = {2, 4, 5, 7, 8, ...};
foreach (int n in numbers)
    DoWhatYouWantWith(n);
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
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…
Suggested Courses

810 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