C # matrice de imprimare

Exemple de cod

6
0

C # matrice de imprimare

string[] myArray = {"Dogs", "Cats", "Birds"};
foreach (string item in myArray)
{
  Console.WriteLine(item);
}
4
0

imprimarea conținutului matricei c#

//array of numbers, it works with strings also
int numbers[3] = {1, 4, 5, 6}

/*declares int named 'number' and assigns it the value of an index
starting from index 0 to the end of the array, in this case, 3*/
foreach(int number in numbers){
  //prints the number
  Console.WriteLine(number);
}
0
0

matrice de imprimare în c#

Console.WriteLine(string.Join("\n", myArrayOfObjects));

În alte limbi

Această pagină este în alte limbi

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................