vb.net Code:
Public Shared Sub ExecuteThread(ByVal PackedScannableParameter As String, ByVal theFarm As enchancedWinClient) theFarm.PackedScannable = PackedScannableParameter theFarm.Thread = New System.Threading.Thread(Sub() beginThreadAction.Invoke(PackedScannableParameter, theFarm)) theFarm.Thread.Start() End Sub
The function system.threading.thread constructor takes a delegate that accept no argument. My delegate, beginThreadAction accepts 2 arguments. I just shoehorn it with lamda expression.
How does that really work is beyond me. It's working though.




How does that really work is beyond me. It's working though.
Reply With Quote