ylbtech-Unitity-CS-Arrays:数组

时间:2024-09-07 15:05:08
ylbtech-Unitity-CS-Arrays:数组
1.A,效果图返回顶部
1.B,源代码返回顶部
1.B.1,
using System;
class DeclareArraysSample
{
public static void Main()
{
// 一维数组
int[] numbers = new int[]; // 多维数组
string[,] names = new string[,]; // 数组的数组(交错数组)
byte[][] scores = new byte[][]; // 创建交错数组
for (int i = ; i < scores.Length; i++)
{
scores[i] = new byte[i+];
} // 打印每行的长度
for (int i = ; i < scores.Length; i++)
{
Console.WriteLine("Length of row {0} is {1}", i, scores[i].Length);
}
}
}
1.B.2,
1.C,下载地址返回顶部
ylbtech-Unitity-CS-Arrays:数组 作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。