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

Convert String.Concat to interpolated string #849

Closed
wmjordan opened this issue Sep 27, 2021 · 0 comments · Fixed by #1379
Closed

Convert String.Concat to interpolated string #849

wmjordan opened this issue Sep 27, 2021 · 0 comments · Fixed by #1379

Comments

@wmjordan
Copy link

I have some legacy code which uses quite a lot of String.Concat like the following snippet.
Is it possible to add an analyzer to convert them to interpolated strings?

var t = String.Concat(DateTime.Now, " ", LogLevel.Info, ": ", log.Content);

Expected result:

var t = $"{DateTime.Now} {LogLevel.Info}: {logContent}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants