TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Cemal Sener
NA
121
703
Getting my carriage returns back in C# code
Aug 15 2020 2:17 AM
After an auto conversion task of one VB project to C#, tool doing this task dropped all Carriage Returns (\r\n) from my code. Now I have very long and diffucult to read code lines.
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 ?
Reply
Answers (
2
)
Jenkins to github
error while generating password using WART-1.8.2.2.exe