数组的类型及其工作原理? [英] Types of array and how they work?

查看:75
本文介绍了数组的类型及其工作原理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有这种数组( string [,] rptarray = new string [rptcnt,6]; )并且我真的不明白它是如何工作的string [,]

是否有人知道为什么以这种方式定义它是如何工作的?

解决方案

< blockquote>如果你没有把','它被视为单维数组

通过这个链接

http://stackoverflow.com/questions/3814145/how-can-i -declare-a-two-string-array-in-c [ ^ ]

希望这有助于


Hi I have this kind of array (string[,] rptarray = new string[rptcnt, 6];) and i dont really understand how it works "string[,]"
Does any one have a clue why it was defined in this manner and how does it work?

解决方案

If you not put ',' it's treated as a Single dimensional array
Go through this link
http://stackoverflow.com/questions/3814145/how-can-i-declare-a-two-dimensional-string-array-in-c[^]
Hope this helps


这篇关于数组的类型及其工作原理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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