CSharp examples for Language Basics:string
Eager Evaluation during String Interpolation
using System;/*ww w . ja v a2s. c o m*/ using System.ComponentModel; class EagerEvaluation { static void Main() { string value = "Before"; FormattableString formattable = $"Current value: {value}"; Console.WriteLine(formattable); value = "After"; Console.WriteLine(formattable); } }