: I want to make a console application that reads a 2d array,
: i tried to use Console.Read but it doesn't work.
: Help me.
: simion314
:
Why don't you use a ArrayList, it is a 2d array. then foreach the arraylist.
this is what you asked:
using System;
namespace ArraysSamp
{
class Class1
{
static void Main(string[] args)
{
string[,] names = new string[,]
{
{"Rosy","Amy"},
{"Peter","Albert"}
};
foreach( string str in names)
{
Console.WriteLine(str);
}
}
}}