Question : how to make a c# array
Answered by : zein
// Syntax:
datatype_variable[dimension] = new datatype[size]{array};
// For example:
string MyArray[] = new string[1]{"Hello","World"};
// or just:
string MyArray[]={"Hello","world"};
// for multidimensions:
// 2D array: // 2 arrays, 3 values //
int MyArray=[,]=new int[1,2]{ {1,2,3}, {1,2,3}
}
// 3D array: // 2 arrays, 3 arrays, 4 values //
int MyArray=[,,]=new int[1,2,3]{ { {1,2,3,4}, {1,2,3,4}, {1,2,3,4} }, { {1,2,3,4}, {1,2,3,4}, {1,2,3,4} }
}
Source : | Last Update : Tue, 08 Sep 20
Question : c langauge array
Answered by : calm-crane-jgaacrsln5wd
type arrayName [ arraySize ] = { elements };
Source : | Last Update : Mon, 30 Nov 20