About
In this code snippet, we will take a look at string interpolation in C#.
To enable string interpolation put the $ character before the string. Now variables in brackets can be put straight into a string. This is a bit more convenient compared to splitting up as string, putting the desired variables in between the strings and than concatenating it all together.
Let’s have a look at the code below to see how to use string interpolation.