multithreading - VB.NET: Anonymous function to new thread -


i have code:

public sub submit(     byval reasonid integer,      byval email string,      byval message string )     '[argument validation code here]     emailcontroller.sendmail(reasonid, email, message) end sub 

i want spin off in new thread submit() returns right after creating , start thread.

in c#, this:

new thread(() => {         emailcontroller.sendmail(reasonid, email, message) }).start(); 

how do in vb.net?

new thread(sub() emailcontroller.sendmail(reasonid, email, message)).start() 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -