Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comment in c#

Status
Not open for further replies.

jslmvl

Vendor
Jan 26, 2008
268
GB
in C#, what is the difference between those two:
<% //string s = "aaaaaa"; %>
<%-- string s = "aaaaaa"; --%>
Thanks for answer me.
 
<%-- some code --%> - is ASP-like comment used only in ASPX file. In your .cs (code-behind) you can use

// or /* Multi-line
comment */

The first syntax you showed it not valid, I believe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top