Last active
August 27, 2017 16:44
-
-
Save JoseGonzalez321/64b6a88e645dc34458823d8506579fba to your computer and use it in GitHub Desktop.
String Interpolation for post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var person = new Person {FirstName = "Jose", LastName = "Gonzalez"}; | |
var name = string.Format("My name is {0} {1}", person.FirstName, person.LastName); | |
// With C# 6 string interpolation becomes | |
var name = "My name is {person.FirstName} {person.LastName}"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment