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

Avoid string.Join in interpolated string #708

Open
bcollamore opened this issue Nov 11, 2023 · 0 comments
Open

Avoid string.Join in interpolated string #708

bcollamore opened this issue Nov 11, 2023 · 0 comments
Labels
new analyzer New Diagnostic Analyzer

Comments

@bcollamore
Copy link
Member

This code
return $@"{CommandType} Reasons:{string.Join(Environment.NewLine, ReasonList)}";
can be simplified to:
return $@"{CommandType} Reasons:{Environment.NewLine}{ReasonList}}";

@bcollamore bcollamore added the new analyzer New Diagnostic Analyzer label Nov 11, 2023
@ynsehoornenborg ynsehoornenborg changed the title Avoid string.Join in intepolated string Avoid string.Join in interpolated string Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new analyzer New Diagnostic Analyzer
Projects
None yet
Development

No branches or pull requests

1 participant