C # multidimensional arrays and nested arrays

Source: Internet
Author: User

usingSystem;namespaceAbc.e.f//equivalent to the following hierarchical nesting of the wording. And this type of writing, regardless of whether the namespace ABC has been defined, or whether the namespace E has been defined{    classMYTESTX {Static voidMain (string[] args) {            int[,] matrix =New int[2,5];//multidimensional arrays. Just increase from dimension, not array nesting. Kind of like a multidimensional matrix .            int[] MT1 =New int[2][];//An array of arrays, with two elements, each of which is an array. Equivalent to an array of nested arrays. Sort of like a binary chain list .mt1[0] =New int[5]; mt1[1] =New int[4]; int[,,,] Mt =New int[2,3,4,5];//Array of arrays, multiple nested arrays.         }    }}

C # multidimensional arrays and nested arrays

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.