Advertisement
romaryo2010

ram17

Apr 15th, 2019
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.01 KB | None | 0 0
  1.  using System;
  2.  
  3. class Array
  4. {
  5.  
  6. public static void Main()
  7. {
  8.  
  9. int[] myInts = { 5, 10, 15 };
  10.  
  11. bool[][] myBools =new bool[2][];
  12.  
  13. myBools[0] = new bool[2];
  14.  
  15. myBools[1] = new bool[1];
  16.  
  17. double[,] myDoubles = new double[2, 2];
  18.  
  19. string[] myStrings =new string[3];
  20.  
  21. Console.WriteLine("myInts[0]: {0}, myInts[1]:{1}, myInts[2]: {2}", myInts[0], myInts[1], myInts[2]);
  22.  
  23. myBools[0][0] = true;
  24.  
  25. myBools[0][1] =false;
  26.  
  27. myBools[1][0] = true;
  28.  
  29. Console.WriteLine("myBools[0][0]: {0},myBools[1][0]: {1}", myBools[0][0], myBools[1][0]);
  30.  
  31. myDoubles[0, 0] = 3.147;
  32.  
  33. myDoubles[0, 1] = 7.157;
  34.  
  35. myDoubles[1, 1] = 2.117;
  36.  
  37. myDoubles[1, 0] = 56.00138917;
  38.  
  39. Console.WriteLine("myDoubles[0, 0]: {0},myDoubles[1, 0]: {1}", myDoubles[0, 0], myDoubles[1, 0]);
  40.  
  41. myStrings[0] = "Joe";
  42.  
  43. myStrings[1] = "Matt";
  44.  
  45. myStrings[2] = "Robert";
  46.  
  47. Console.WriteLine("myStrings[0]: {0} myStrings[1]: {1}, myStrings[2]: {2}", myStrings[0], myStrings[1], myStrings[2]);
  48.  
  49. }
  50.  
  51. }
  52. down load full project from here
  53. http://cesinthi.com/2vB9
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement