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
Post a Comment