Created
September 18, 2023 19:45
-
-
Save EntaltsevSN/ae7047962ace7c0ab205ab52cf017c00 to your computer and use it in GitHub Desktop.
Strings test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string s1 = "Каждый "; | |
string s2 = "охотник "; | |
string s3 = "желает "; | |
string s4 = "знать, "; | |
string s5 = "где "; | |
string s6 = "сидит "; | |
string s7 = "фазан."; | |
Console.Write(s1); | |
Console.Write(s2); | |
Console.Write(s3); | |
Console.Write(s4); | |
Console.Write(s5); | |
Console.Write(s6); | |
Console.WriteLine(s7); | |
string concatString = s1 + s2 + s3 + s4 + s5 + s6 + s7; | |
Console.WriteLine(concatString); | |
string interpolatedString = $"{s1}{s2}{s3}{s4}{s5}{s6}{s7}"; | |
Console.WriteLine(interpolatedString); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment