Either one by one enter on the desired location of code line to get a break in the line or must use REGEX (I mean Replace Tool of VS with wild chars). REGEX does this job and breaks line where you wanted successfully. But how I calculate the starting location of new line. I do not want new line starting with a nonsense distance to left margin. Let me give example:
string slsqt = "SELECT * FROM SalesTable WHERE Year(SalesDate) > 2001";
Press ENTER on 'Year' in Visual Studio you will get just two lines like these:
string slsqt = "SELECT * FROM SalesTable WHERE
Year(SalesDate) > 2001";
Nice, it started one TAB ahead from left margin. Well how to do this with REGEX Replace using \r\n ?
How I can calculate and add SPACE to REGEX ?
Cemal SenerPosted Aug 15, 2020, 8:29 AM
Farhan AhmedPosted Aug 15, 2020, 7:20 AM