Click here to Skip to main content
15,900,378 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have to concat two html contents. How to do this?(plus operator doesn't works)
Posted
Comments
koolprasad2003 16-Dec-11 6:50am    
can you Share your code ?
Richard MacCutchan 16-Dec-11 7:06am    
Of course it works. Edit your question and show the actual code you have tried.

 
Share this answer
 
Comments
Amir Mahfoozi 17-Dec-11 7:54am    
+5 right answer.
C#
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();
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900