Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在发送附件,并且电子邮件发送成功,但是当我尝试删除同一个文件时,它给出了错误,因为“文件正在被另一个进程使用”我正在由 system.io.file.delete() 删除
你做对了Dispose吗?对于发送邮件Stream和SmtpClient之后发送邮件?
Dispose
Stream
SmtpClient