Newbie question

  • Thread starter Thread starter Nikolay Petrov
  • Start date Start date
Nikolay Petrov said:
what "Dim recv() As Byte = New Byte(1) {}" means?


It means that a byte array containing a two bytes is created (indices 0
through 1). I'd use the code below instead because for me it's more
readable:

\\\
Dim recv(1) As Byte
///
 
Nikolay Petrov said:
actually I wanted to know what the "{}" means?


It indicates that 'New Byte(1)' is intended to create an array instead of
calling a parameterized constructor of the 'Byte' class.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top