We can do the string interpolation using "$" sign .
String interpolation using “$” sign: This is new feature added in C# 6.0 which simplifies the process of string formatting (substituting variable into string using indexed parameter to make the string dynamic), has been simplified with the help of a "$" symbol that is without using indexed parameter we can straight way use the variable within the double quotes prefixing the string with a "$" symbol.
Before C# 6.0 :
String interpolation using “$” sign: This is new feature added in C# 6.0 which simplifies the process of string formatting (substituting variable into string using indexed parameter to make the string dynamic), has been simplified with the help of a "$" symbol that is without using indexed parameter we can straight way use the variable within the double quotes prefixing the string with a "$" symbol.
Before C# 6.0 :
After C# 6.0
No comments:
Post a Comment