Hi, i'm new to c# and need help on designing a programme. I need to create a 2d array which has to accept 12 values (3 verticalx4 horizontal)(with decimal places) . I have to be able to input the values of each element in the area using the console. I am having trouble doing this and any help would be appreciated
ironbrew
0
Newbie Poster
Recommended Answers
Jump to PostThe syntax for creating such an array can be like this:
string[,] array2d = new string[,] { {"a1", "b1", "c1", "d1"}, {"a2", "b2", "c2", "d2"}, {"a3", "b3", "c3", "d3"} };
Take a look at those posts for better understanding:
Jump to PostYou can do it like this also:
string[][] array = new string[3][]; array[0] = new string[4]; array[0][0]; = "a"; array[0][1] = "b"
All 6 Replies
AleMonteiro
238
Can I pick my title?
ironbrew
0
Newbie Poster
AleMonteiro
238
Can I pick my title?
Momerath
1,327
Nearly a Senior Poster
Featured Poster
tinstaafl
1,176
Posting Maven
ddanbe
2,724
Professional Procrastinator
Featured Poster
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.