roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

Convert String.Concat to interpolated string

Open wmjordan opened this issue 4 years ago • 0 comments
trafficstars

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

wmjordan avatar Sep 27 '21 01:09 wmjordan