Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing code style for string interpolation #936

Closed
pregress opened this issue May 14, 2018 — with docs.microsoft.com · 3 comments
Closed

Missing code style for string interpolation #936

pregress opened this issue May 14, 2018 — with docs.microsoft.com · 3 comments

Comments

Copy link

pregress commented May 14, 2018

It would be great to have a rule to enforce string interpolation.

Example:

string x = y + " more text";

Into this:

string x = $"{y} more text"; 

Another suggestion would also be to change multiple line string concatenation to a verbatim string.
Or a string with escape characters like a file path.

Example:


"SELECT Column " +
"FROM Table";

Into this:


@"SELECT Column 
  FROM Table";

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@gewarren
Copy link
Member

@prebenh Thank you for the suggestions. It will get more traction with the product team if you are able to leave the suggestions on the "Product feedback" link at the bottom of the topic. This issues page is for problems with the documentation.

@pregress
Copy link
Author

@gewarren
Copy link
Member

@prebenh Preben thank you so much for transferring the issue. Hopefully they will incorporate your suggestion. Closing this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants