摘要:
二维数组定义C/C++:int a[][]= {{1,1,3,2},{5,9,0,2},{3,4,7,5}}; int **a= {{1,1,3,2},{5,9,0,2},{3,4,7,5}};C#:二维固定矩阵 int[,] a={{1,1,3,2},{5,9,0,2},{3,4,7,5}}; 参差矩阵定义(二维可变数组):int[][] a=new int[3][];(1)C#下二维数组应用 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 ... 阅读全文
摘要:
1、foreach循环与for循环输出结果比较,能达到一样的输出效果。 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace ForeachApplication 7 { 8 class Program 9 {10 static void Main(string[] args)11 {12 int[] a = { 1,5,9,20,16};13 ... 阅读全文