Question 'Connect' is not a member of 'WindowsApplication1.UdpClient'

peppuce

New member
Joined
Dec 9, 2011
Messages
2
Programming Experience
1-3
Hi everybody,
I must be the only one on earth with this problem...I was writing a simple udp client/server program that only sends text messages from one computer to another, but i get an error as i write the first lines of code. The error is, as title says

'Connect' is not a member of 'WindowsApplication1.UdpClient'

I tried searching around but i found no answers...do someone have any ideas?
P.S.
I am working on vs2010 and the code is the following

Imports System.Net
Imports System.Net.Sockets
Imports System.IO
Imports System.Text




Public Class UDPClient


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles connetti.Click
Dim udpClient As New UDPClient()


hello = "Hello, World!"
udpClient.Connect(TextBox1.Text, 8080)


End Sub


End Class

Thank you!
 
Connect is a method of type System.Net.Sockets.UdpClient, not of type WindowsApplication1.UdpClient. Maybe you should name your class something else ;)
 
Back
Top