Inserting content into a string with string interpolation. - CSharp Language Basics

CSharp examples for Language Basics:string

Description

Inserting content into a string with string interpolation.

Demo Code

using System;/*from   ww w.j  av  a2s  .  c  o m*/
class Welcome4
{
   static void Main()
   {
      string person = "abc"; // variable that stores the string "abc"
      Console.WriteLine($"Welcome to C# Programming, {person}!");
   }
}

Result


Related Tutorials