I'm trying out a program which I found on the net. Why is it necessary to put to curly braces at the end of the statement? It gives an error: "Byte has no constructors".
Dim data As Byte() = New Byte(1023) {}
I can't put the code like this either, it produces the error "byte cannot be a 1-dimensional array".
Dim arr As Byte() = New Byte()
Can you explain to me why this is happening?
You need curly braces, because if you don't put them, it means you're trying to call a constructor for a single object -- which is an error for different reasons:
Byte
doesn't have a constructor. (This is only true in this particular case.)