是“dim x()as byte”等价于“dim x as byte()”?

时间:2012-12-06 16:41:46

标签: vb.net

  

可能重复:
  What’s different between Dim files() As String and Dim files As String()?

这两个陈述是否相同?它们似乎表现相同,但结果“x”是否存在差异?

Dim x() As Byte
Dim x As Byte()

1 个答案:

答案 0 :(得分:4)

它们完全相同,你可以看到,如果你用Reflector检查它们。他们都编译到同一个IL。

另请参阅this question,如果您将Byte更改为String,则相同。

相关问题