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

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

问题描述

我在学习 C# 的过程中试图理解一些代码.我不明白我什至需要搜索谷歌才能到达这里,但代码如下:

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天全站免登陆