I read a code to send a email,here part of it:
MailUserState state = new MailUserState()
{
AutoReleaseSmtp = m_autoDisposeSmtp,
CurMailMessage = mMailMessage,
CurSmtpClient = m_SmtpClient,
IsSmpleMail = true,
UserState = AsycUserState,
};
if (m_autoDisposeSmtp)
m_SmtpClient = null;
ThreadPool.QueueUserWorkItem((userState) =>
{
MailUserState curUserState = userState as MailUserState;
curUserState.CurSmtpClient.SendAsync(mMailMessage, userState);
}, state);
Why the lambda expression has no return value?
I think it shoud return a callback instance object.But it has no return statement.Why?