Starting from C# 6.0, you can use string interpolation expressions instead of calling String.Format(). If you pass a lot of arguments to the String.Format() method, the string becomes difficult to understand. Compared to String.Format(), interpolated string expressions allow inserting variables directly in the string.
Suboptimal code
var greeting =string.Format("Hi {0}! How do you feel at {1}?", name, location);
After the quick-fix
var greeting =$"Hi {name}! How do you feel at {location}?";
Our website uses some cookies and records your IP address for the purposes of accessibility, security, and managing your access to the telecommunication network. You can disable data collection and cookies by changing your browser settings, but it may affect how this website functions. Learn more.
With your consent, JetBrains may also use cookies and your IP address to collect individual statistics and provide you with personalized offers and ads subject to the Privacy Notice and the Terms of Use. JetBrains may use third-party services for this purpose. You can adjust or withdraw your consent at any time by visiting the Opt-Out page.