1
Answer

datagridview move cursor to end of table

Roberto Mason

Roberto Mason

17y
4.1k
1
I have this very simple problem, that I can't find any answer's on the net. I wasted a good part of yesterday trying to find the answer. Here goes: I have a datagridview. I programmed a New button (by passing the toolstripAddNew). My line is created at the bottom of the grid, but my cursor is at the top. How do I move the cursor to the end. Thank you very much in advance :) Roberto
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.