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

Posted on 2007-10-01
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

Question by:chicabow
    1 Comment
    LVL 7

    Accepted Solution

    int[] numbers = {2, 4, 5, 7, 8, ...};
    foreach (int n in numbers)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    In one of my recent projects, I was working with IP cameras, I need to take some pictures from the camera and do some processing on it. The first step, was to retrieve the image from camera into Image object. So that it can be displayed or …
    Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now