I feel quite silly asking this, but I couldn’t find a definite answer anywhere. in vb.net, how are the array elements defined (if they are defined) for, for example:
Dim myarray(5) as int
does, at this point in time, myarray(3) for example have a defined value? If so, what is it?
From the MSDN documentation for the Dim statement:
Essentially, value types will be initialized to their default value (0 for numeric types), and reference types will be initialized to Nothing.