hi im currently making a a program using windows application with visual studios.the problem is i am new to this and wonderin if someone can help me.
i am basically having trouble with creating a list of arrays in a Class which will be used to store information and also to show the information which has been added when it has been called.
if there is someone that can help me it will be much appreciated.
thank you.

Recommended Answers

All 3 Replies

..having trouble with creating a list of arrays in a Class ..

Exactly what is the problem you having... You don't know how to make arrays, or is it something else ?

J

i need to know how to make an index of arrays in a class which can be called at any point.the arrays need to store information when added and also needs to display the information when called.Can u help?

you can create arrays of arrays with multi-dimensional rectangular arrays:

int[,] intArray = new int[4,5]; // 4 rows on 5 columns

or jagged arrays:

int[][] intArray = new int[][];

following the declaration, you can enter the data by assigning values according to an index:

intArray[3,2] = 15;

or by adding them between accolades in the array declaration:

int[,] intArray = { {1, 2}, {3, 4}, {5, 6} };

to recall (and display) specific values, just get them by calling the wished index of the array.

hope this helped
pygmalion

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.