Hi guys, I am new to VB.net and struggling to get out of VB6's way of sending data, I am doing this to send a byte array from my client to server, please advice if this is the right way, thanks:
The sending portion:
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim arrNo(3) As Integer
arrNo(0) = 1400
arrNo(1) = 1000
arrNo(2) = 1200
arrNo(3) = 1350
Dim i As Integer
For i = 0 To arrNo.Length - 1
Dim outStream() As Byte = BitConverter.GetBytes(arrNo(i))
Debug.Print(arrNo(i))
serverStream.Write(outStream, 0, outStream.Length)
serverStream.Flush()
Next
End Sub