Tuesday, July 14, 2009

What does @ mean in this asp.net/c# statement lblResult.Text = @"
Product " + txtProductName.Text ;

C#, ASP.NET 3.5

What does @ mean in this asp.net/c# statement lblResult.Text = @"
Product " + txtProductName.Text ;
It means interpret the following string as literal. Meaning, the / in the string will actually be a "/" in the output, rather than having to put "//" to mean the literal character.

avender

No comments:

Post a Comment