c# - Process each line separately in selected text -
i'm trying select set of lines , process each line separately in text document using c# language. how can separate lines process? tried these codes , got struck. can please me this?
envdte.dte dte = mypackage.mypackagepackage.getglobalservice(typeof(envdte.dte)) envdte.dte; envdte.textselection text = (dte.activedocument.selection envdte.textselection);
if reading text file code you:
string filetoread = "d:\\temp.txt"; // temp.txt file read if (file.exists(filetoread)) { streamreader reader = new streamreader(filetoread); { textbox1.text += reader.readline() + "\r\n"; // read each line , pass textbox1 } while (reader.peek() != -1); reader.close(); // close file }
Comments
Post a Comment