Skip to content

Comments

Fix RCS1197#1093

Merged
josefpihrt merged 7 commits intodotnet:mainfrom
jamesHargreaves12:fix/RCS1197
Jun 6, 2023
Merged

Fix RCS1197#1093
josefpihrt merged 7 commits intodotnet:mainfrom
jamesHargreaves12:fix/RCS1197

Conversation

@jamesHargreaves12
Copy link
Contributor

An interpolated string can also be a verbatim string. Currently, The code fix for RCS1197 will not retain the verbatim @ when optimizing a string interpolation which means that the resulting code doesn't compile.

For example

stringBuilder.Append($@"{x:hh\:mm\:ss\.fff}"));

Becomes

stringBuilder.AppendFormat("{0:hh\:mm\:ss\.fff}",x));

jamesHargreaves12 and others added 2 commits June 4, 2023 11:57
Co-authored-by: Josef Pihrt <josef@pihrt.net>
…tringToStringBuilderMethodRefactoring.cs

Co-authored-by: Josef Pihrt <josef@pihrt.net>
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

Successfully merging this pull request may close these issues.

2 participants