1
Answer

Difference between bug, error and failure

Megha Goyal

Megha Goyal

12y
1.1k
1
What is the main difference between bug, error and failure?
Answers (1)
0
Vasanth
NA 2.3k 309.6k 15y


Just simply resolve by ,


After the email is sent use Dispose() method of MailMessage. So here its release all resources and others are disposed here.


And also you can create MailMessage within using block. As a result all resources will be released (disposed or closed) automatically when execution of the block completes.
 


using(MailMessage mmEmail = new MailMessage(...))
{
}

I specially like the alternative solution for "USING". and its very popular in the programming end.

Please mark as answer , if it helps you.