C# 6 string interpolation is not a templating engine, and its not the new String.Format

Posted by: More Whidbey stuff, on 03 Aug 2015 | View original | Bookmarked: 0 time(s)

One of the neat features in the new C# 6 is string interpolation, which is a concise way to inject values into a format string, using curly-brace-enclosed expressions. Here’s a simple example of what it looks like: var url = $"http://weblogs.asp.net/{blog}/{slug}"; This is looking pretty good, and will likely simplify a lot of C# code going forward. It is however easy to get carried away and mistakenly think the feature is doing more than it does, and is designed for more diverse scenarios,...

Category: Regex | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 783 | Hits: 46

Similar Posts

  • Filtering with string parameter that allows free user input more
  • LINQ Tip of the week: System.String support more
  • Single Project Areas With ASP.NET MVC 2 Preview 1 more
  • Url.Action() and RouteValue Encoding more
  • Canonical Formats and Query Strings - IIS SEO Toolkit more
  • Export Word to PDF docs compliant to PDF/A-1b via Aspose.Words more
  • Validation - Part 2 - Client-Side more
  • Validation - Part 1 - Getting Started more
  • Native JSON Parsing: What does it mean? more
  • ORM Release History : Q1 2009 SP1 (version 2009.1.405.1) more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD