Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. $Infos = array("id" => array(), "name" => array(), "age" => array(), "number" => array(), "time" => array(), "version" => array());
  2.  
  3. class TestArraysClass
  4. {
  5. static void Main()
  6. {
  7. // Declare a single-dimensional array
  8. int[] array1 = new int[5];
  9.  
  10. // Declare and set array element values
  11. int[] array2 = new int[] { 1, 3, 5, 7, 9 };
  12.  
  13. // Alternative syntax
  14. int[] array3 = { 1, 2, 3, 4, 5, 6 };
  15.  
  16. // Declare a two dimensional array
  17. int[,] multiDimensionalArray1 = new int[2, 3];
  18.  
  19. // Declare and set array element values
  20. int[,] multiDimensionalArray2 = { { 1, 2, 3 }, { 4, 5, 6 } };
  21.  
  22. // Declare a jagged array
  23. int[][] jaggedArray = new int[6][];
  24.  
  25. // Set the values of the first array in the jagged array structure
  26. jaggedArray[0] = new int[4] { 1, 2, 3, 4 };
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement