paulirwin / JavaToCSharp

Java to C# converter
MIT License
266 stars 90 forks source link

Translate String.format into string interpolation (or at least string.Format) #22

Open paulirwin opened 3 years ago

paulirwin commented 3 years ago

This arguably goes beyond syntactic translation, although you could also argue that the syntax of a format string is different between the languages. Would be really cool to translate into string interpolation (i.e. $"This is a {value} formatted string") but at least a translation to string.Format would be welcome. Need to think about format placeholders more complicated than i.e. %s, such as decimal places and such.