⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c5-04.cs

📁 一本很好的教材.C#开发者必备.内容全面,很难得哦.
💻 CS
字号:
//使用数组的示例
using System;
class DeclareArraysSample
{
    public static void Main()
    {
        // 一维数组
        int[] numbers = new int[5];
        // 多维数组
        string[,] names = new string[5,4];
        // 交错数组
        byte[][] scores = new byte[5][];
        for (int i = 0; i < scores.Length; i++)
        {
            scores[i] = new byte[i+3];
        }
        // 打印每行长度
        for (int i = 0; i < scores.Length; i++)
        {
            Console.WriteLine("第{0}行的长度为{1}!", i, scores[i].Length);
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -