CFXIXI工作室首页
CF西西的博客 | 字典型(Dictionary)用法(多维存储数据容器)

字典型(Dictionary)用法(多维存储数据容器)

11. 四月 2012

 

1.Dictionary类型定义:

var teamDetails = new Dictionary<int, double[,]>();

2.如何附加变量

 teamDetails.Add(teamId, new double[4, 9]);

3.Dictionary类型的判断是否包含方法:

 

        if (teamDetails.ContainsKey(teamId))

4.三维数组赋值:

                teamDetails[teamId][3, bbb] += aaa;

 

                teamDetails[teamId][0, bbb] += ccc;

 

 

 

 

C#