Proposal: Stringinterpolation

  • Thread starter Thread starter Helium
  • Start date Start date
H

Helium

In some languages, mainly scripting languages, there is a feature
called string interpolation. Something like this would be cool in C#,
too.

# SomeType foo = new SomeType();
# ...
# String str = "The text representation of foo is ${foo}."


This would be translated to:

# String str = "The text representation of foo is " + (foo).toString()
+ "."
 
Back
Top