首页 > 编程 > .NET > 正文

ASP.NET中的注释符号

2024-07-10 12:58:15
字体:
来源:转载
供稿:网友
<h1>' (single quote)</h1>
the single quote character (') introduces a comment line in vb.net code. it can be used anywhere on a source line. the end of the physical line ends the comment.
<h1>rem</h1>
the keyword rem also introduces a comment in vb.net code. it can be used anywhere on a source line. the end of the physical line ends the comment.
<h1>/* and */ </h1>
the characters /* and */ open and close respectively a multi-line comment block--the so called regular comment--in c# code. regular comments can span over a section of a line, a single line, or multiple lines.
<h1>//</h1>
the double slash characters (//) introduce a one-line comment in c# code and can be placed anywhere on a source line. the one-line comment extends to the end of the line. equivalent to ' and rem in vb.net.
<h1>///</h1>
the comments introduced by tripple slash characters (///) are a c#-specific feature. by means of xml markup you can document your code (e.g. <param> is used for describing parameters). if you run the compiler with the /doc option, it automatically generates an xml documentation file.
<h1><!-- and --> </h1>
the characters <!-- and --> are standard html (adopted from sgml) comment delimiters. note, that the comment text is sent to the browser and thus visible outside (source code).
<h1><%-- and --%></h1>
server-side comments (<%-- --%>) enable asp.net page developers to prevent server code (including server controls) and static content from executing/rendering. they assume a similar role to the standard html comments with the smashing difference that the text of the comment is not sent to the browser.  

,欢迎访问网页设计爱好者web开发。
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表