0

C# User input

In the lesson it has : string yourName; Console.WriteLine("What is your name?"); yourName = Console.ReadLine(); Console.WriteLine("Hello {0}", yourName); I wrote it in Visual Studio like so string yourName; Console.WriteLine("What is your name?"); yourName = Console.ReadLine(); Console.WriteLine(

quot;Hello {yourName}"); My question is will using $ interpolate string affect the code later on if there is alot and is it okay to do it like this?

14th Jan 2017, 9:36 AM
Geoffrey Pickering
Geoffrey Pickering - avatar
1 ответ
+ 2
This is used since C#6 and its okay to do it like this.
14th Jan 2017, 11:29 AM
Max_N
Max_N - avatar