//HI All what is wrong with this code,i try to declare 4 dim. array
int [, , ,] a = new int [3,4] = {{2,3,4,5}, {34,56,25,67}, {22,44,55,77}};
//how do i declare it an assign values to it?Thanks.
aluhnev
0
Junior Poster in Training
Recommended Answers
Jump to PostGet rid of the second "=" sign. Also your declarations don't match. You have 3 commas, then only 2 commas (and dimensions) in the intialization. The following should work:
int [,] a = new int [3,4] { {2,3,4,5}, {34,56,25,67}, {22,44,55,77} };
All 4 Replies
cgeier
187
Junior Poster
aluhnev
0
Junior Poster in Training
cgeier
187
Junior Poster
aluhnev
0
Junior Poster in Training
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.