What's different between Dim files() As String and Dim files As String()?

后端 未结 4 1973
抹茶落季
抹茶落季 2021-01-05 09:17

In this code:

Dim files() As String = Directory.GetFiles(\"C:/\")

Dim files As String() = Directory.GetFiles(\"C:/\")

is there a differenc

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-05 10:07

    The two are identical. If you use Reflector, you can see that they are compiled to the same IL:

    .field private string[] files
    

提交回复
热议问题