zoukankan      html  css  js  c++  java
  • C#多维数组与嵌套数组

    using System;
    
    namespace abc.e.f//等价于下面分层嵌套的写法。且这种写法不管命名空间abc有没有定义过,也不管命名空间e有没有定义过
    {
        class MYTestX
        {
            static void Main(string[] args)
            {
                int[,] matrix = new int[2, 5];//多维数组。只是从维度上增加,并不是数组嵌套。有点像多维矩阵
    
                int[][] mt1 = new int[2][];//数组的数组,有两个元素,每个元素是一个数组。相当于嵌套数组。有点像二叉链表
    
                mt1[0] = new int[5];
                mt1[1] = new int[4];
                int[,,,] mt = new int[2, 3,4, 5];//数组的数组,多重嵌套数组。
            }
        }
    
    }
  • 相关阅读:
    python 安装包总结
    python wmi使用
    Jquery
    查看linux操作系统位数
    三元
    git clone 指定分支的内容
    慕课网
    http://amazeui.org 后天框架
    tp between
    git pull
  • 原文地址:https://www.cnblogs.com/timeObjserver/p/6172195.html
Copyright © 2011-2022 走看看