¡GoConqr estrena diseño! Cuéntanos qué te parece.

Mapa mental

Arrays

Josh Bee Inglés

Contenido del mapa

Arrays

  1. An array is a fixed number of values of the same data type grouped under a single indentifier

  2. Values can be assigned to or extracted from an array using the array name follow by the index (the position of the value) inside square brackets. For example: studentNames[4] where the array name is "studentNames" and the index is "4".

  3. 2D arrays

    • These are the same as arrays except they use 2 dimensions. This means you can create a virtual table filled with values.
    • In a 2D array, the index is slightly different; you need 2 numbers (separated by commas) rather than 1, the first number being which row you want and the second being the column. For example [2,4]
    • Creating a 2D array is almost the same as a standard one but with a couple of slight differences.
      • Creating a 2D array would look like this: string[,] studentNames = new.string[3,2] This would create a 2D array with 3 rows and 2 columns
  4. To create an array you input the data type that the array will contain, follow this with a pair of square brackets, then the name of the array, then = new.(chosen data type)[length of array].

    • Example: string[] studentNames = new.string[7] This would create an array of strings that's 7 values long and called "studentNames"

Información

Descripción
Mapa Mental sobre Arrays, creado por Josh Bee el 03/06/2020.
Creado por
Josh Bee
Visitas
1
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?