Hello All
I want to call a function in thread which is taking some parameter like
FTPService FtpOj = new FTPService();
FtpOj.AvtivateFTP(item, ObjFTP, AppHelper.DoEventLog, AppHelper.DoErrorLog, AppHelper.EventMessage, strLableXmlPath, AppHelper.emailfrom);
- How can i call AvtivateFTP() method in thread and pass parameter inside function?
- Can we call only void type function inside thread?
I don’t know where FTPService comes from but I would expect some member like
In lack of that, you can use a lambda:
And to question 2: Yes, but there are workarounds, for example in the TPL library you can define a Task returning a value.