Using TcpClient

G

Guest

Can someone tell me what is wong with this code? I cannot seem to get past
first base.

I have a form with one button. In the following code, TcpClient gets
underlined in blue, meaning an error, and the error is "type expected".
TcpClient is a class under system,net.sockets. In fact, I am trying to
extract code from a demo example and thinkI am copying the exact words but
this doesn't work.

Imports System.IO
Imports System.Net.Sockets

Public Class TcpClientForm
Inherits System.Windows.Forms.Form

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim tcpCli As New TcpClient(host, port)

End Sub
End Class
 
G

Guest

I would like to withdraw this question. I must have had an unprintable
character somewhere in my code as it has somehow seemed to have fixed itself.
;-)
 

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

Top