Created
January 6, 2014 08:07
-
-
Save swkwon/8279704 to your computer and use it in GitHub Desktop.
concat2
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
static void Main(string[] args) | |
{ | |
// To run this program, provide a command line string. | |
// In Visual Studio, see Project > Properties > Debug. | |
string userName = args[0]; | |
string date = DateTime.Today.ToShortDateString(); | |
// Use the + and += operators for one-time concatenations. | |
string str = "Hello " + userName + ". Today is " + date + "."; | |
System.Console.WriteLine(str); | |
str += " How are you today?"; | |
System.Console.WriteLine(str); | |
// Keep the console window open in debug mode. | |
Console.WriteLine("Press any key to exit."); | |
Console.ReadKey(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment