Cheung Tat Ming Cheung Tat Ming - 3 months ago 4 Question

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

In this code:

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

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

is there a difference between the statements?


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

.field private string[] files