http://forum.ikaka.com/topic.asp?board=55&artid=7453084
// arrays.cs
using System;
class DeclareArraysSample
{
public static void Main()
{
// Single-dimensional array
int[] numbers = new int[5];// Multidimensional array
string[,] names = new string[5,4];// Array-of-arrays (jagged array)
byte[][] scores = new byte[5][];// Create the jagged array
for (int i = 0; i < scores.Length; i++)
{
scores = new byte[i+3];
}}
还有啊~byte[][] scores = new byte[5][];什么意思?这种东西我都没见过的~
// arrays.cs
using System;
class DeclareArraysSample
{
public static void Main()
{
// Single-dimensional array
int[] numbers = new int[5];// Multidimensional array
string[,] names = new string[5,4];// Array-of-arrays (jagged array)
byte[][] scores = new byte[5][];// Create the jagged array
for (int i = 0; i < scores.Length; i++)
{
scores = new byte[i+3];
}}
还有啊~byte[][] scores = new byte[5][];什么意思?这种东西我都没见过的~
scores[1] = new byte[2];
scores[2] = new byte[3];
scores[3] = new byte[4];
scores[4] = new byte[5]; 明白了吧,哈哈