Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Passing Multidimensional Arrays As Arguments
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { static void Print2DArray(int[,] arr) { for (int row = 0; row < arr.GetLength(0); row++) { for (int col = 0; col < arr.GetLength(1); col++) { System.Console.WriteLine("Element({0},{1})={2}", row, col, arr[row, col]); } } } public static void Main(string[] args) { int [,] intMatrix = new int [4,2] { {1,2}, // הגדרת המערך {3,4}, {5,6}, {7,8} }; Print2DArray(intMatrix); // שליחת מערך להדפסה // Keep the console window open in debug mode. System.Console.WriteLine("Press any key to exit."); System.Console.ReadKey(); } } }
run
|
edit
|
history
|
help
0
my
Número primers
merge 2 sorted array
tablecsv
Length
Out reference example
3
Story
Palindrome 1
test