Skip to content

Instantly share code, notes, and snippets.

@JoseGonzalez321
Last active August 27, 2017 16:44
Show Gist options
  • Save JoseGonzalez321/64b6a88e645dc34458823d8506579fba to your computer and use it in GitHub Desktop.
Save JoseGonzalez321/64b6a88e645dc34458823d8506579fba to your computer and use it in GitHub Desktop.
String Interpolation for post
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