CSharp examples for System:Array Element
Prints the elements of the array next to each other
using System.Threading.Tasks; using System.Text; using System.Linq; using System.Collections.Generic; using System;/*from w w w.j a v a 2 s. co m*/ public class Main{ /// <summary> /// Prints the elements of the array next to each other /// </summary> /// <param name="array">The array we want to print</param> public static void PrintArray(int[] array) { foreach (int el in array) { Console.Write(el + " "); } Console.WriteLine(); } public static void PrintArray(int[][] array) { foreach (int[] row in array) { PrintArray(row); } } }