Skip to content

Convert String.Concat to interpolated string #849

@wmjordan

Description

@wmjordan

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}");

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions