Results 1 to 7 of 7

Thread: It's a loophole isn't it?

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2007
    Posts
    544

    It's a loophole isn't it?

    vb.net Code:
    1. Public Shared Sub ExecuteThread(ByVal PackedScannableParameter As String, ByVal theFarm As enchancedWinClient)
    2.         theFarm.PackedScannable = PackedScannableParameter
    3.         theFarm.Thread = New System.Threading.Thread(Sub() beginThreadAction.Invoke(PackedScannableParameter, theFarm))
    4.         theFarm.Thread.Start()
    5.     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.
    Last edited by teguh123; Mar 2nd, 2011 at 01:02 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width