这是什么意思时,有一个数组声明中逗号?例如浮动[,] [英] What does it mean when there is a comma inside an array declaration? e.g. float[,]

查看:133
本文介绍了这是什么意思时,有一个数组声明中逗号?例如浮动[,]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些code我试图同时学习C#理解。我不明白我甚至不需要谷歌搜索到这里,但code是如下:

I have some code I'm trying to understand while learning C#. I do not understand what I even need to search Google for to get here, but the code is as follows:

float[,] heightAll = terData.GetHeights(0, 0, allWidth, allHeight);

为什么数组声明有一个逗号,括号之间?

Why does the array declaration have a comma in between the brackets?

推荐答案

这将是一个二维数组。您也可以指定多个维度:

That would be a two-dimensional array. You can also specify more dimensions:

多维数组(C#编程指南)

这篇关于这是什么意思时,有一个数组声明中逗号?例如浮动[,]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆