Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

string interpolation in c#

var title = String.Format("{0} ({1})", post.Title, post.Comments.Count); 
//C# 6 introduces a beautiful way to write the same code in a more direct way:
var title = $"{post.Title} ({post.Comments.Count})";
 
PREVIOUS NEXT
Tagged: #string #interpolation
ADD COMMENT
Topic
Name
2+5 =