Have you ever wanted to concatenate multiple strings to make one string and felt like the code should be shorter? So have I. For instance you may have written something like this:

Of course the above code will work fine to make the message but it would be great to be able to make a string which basically has placeholders. For that reason C# also provides string interpolation. Instead of using string concatenation like we did above you can write the code as follows:

This feature became available C# 6. If you want to read more information about it directly from Microsoft you can check this page out. As always, happy coding!!! šŸ˜Ž

Categories: BlogCSharp

Leave a Reply

Your email address will not be published. Required fields are marked *