7
Answers

How to get Value of selected textbox line to string?

thiago costa

thiago costa

11y
1.4k
1
Hello there guys.

I have a multiline text box. Like this:

57723882
99665588
11225544

So, I have a double click event (currently has wrong code)

I want the string _selectedline to be = the current selected line +".txt, so that, when I doubleclick on an specific line, it will open for example 99665588.txt

The code below is good, but I don't know how to get the string value of the selected line of the textbox.


Thanks Guys

   private void TB_result_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            string _selectedline = ""
            System.Diagnostics.Process.Start(_selectedline);
        }

--EDIT--
Related Solved Previous Thread 
http://www.c-sharpcorner.com/Forums/Thread/219731/how-to-display-a-list-of-files-in-a-folder-in-a-text-box.aspx

Answers (7)