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

后端 未结 4 1974
抹茶落季
抹茶落季 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 09:53

    Both are the same

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

    Both will declare an array and store all files name in C:\ directory

提交回复
热议问题