Chapter 9. Stringy features
- Using interpolated string literals for more-readable formatting
- Working with FormattableString for localization and custom formatting
- Using nameof for refactoring-friendly references
Everyone knows how to use strings. If string isn’t the first .NET data type you learned about, it’s probably the second. The string class itself hasn’t changed much over the course of .NET’s history, and not many string-oriented features have been introduced in C# as a language since C# 1. C# 6, however, changed that with another kind of string literal and a new operator. You’ll look at both of these in detail in this chapter, but it’s worth remembering that the strings themselves haven’t changed ...
Get C# in Depth, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.