3
Answers

How to compare two values of two strings

vinni jain

vinni jain

15y
4k
1

Hi,
How can I compare two strings so that I get the best match.
I have made form1 with two panels.In the upper panel there is a textbox in which user can enter any string and now I want to compare this string with the text property of other forms (form2,form3  etc....). 
If string matches completely with the text property of any particular form then it should display that form on lower panel  in form1 . and if it does not matches , then it should display error in messagebox.
 
How can I do this........
Answers (3)
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.