0

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.

3
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by pygmalion
0

..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

0

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?

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.