Hi
I'm newbie to vb.net
I'm writing a program which uses threads. the problem is that I'm trying to pass a parameter using a thread:
When I'm trying to run the program I receive an error "'AddressOf' operand must be the name of a method; no parentheses needed" something like that.
Could anyone help me please because I do not know how to get over with this error
thanks
I'm newbie to vb.net
I'm writing a program which uses threads. the problem is that I'm trying to pass a parameter using a thread:
VB.NET:
Sub moo
Dim t As Thread
t = New Thread(AddressOf Me.foo(sName))
t.Start()
End Sub
Sub foo(ByVal sName as string)
.......
End Sub
When I'm trying to run the program I receive an error "'AddressOf' operand must be the name of a method; no parentheses needed" something like that.
Could anyone help me please because I do not know how to get over with this error
thanks