国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

C# Source 與VB Source 的不同

2019-11-18 17:17:15
字體:
來源:轉載
供稿:網友

  C# Source

 
   Intro2_cs.aspx

 

 1 <%@ Page Language="C#"%>
 2
 3<html>
 4   <head>
 5      <link rel="stylesheet"href="intro.CSS">
 6   </head>
 7
 8   <body>
 9
10       <center>
11
12       <form action="intro2_cs.aspx" method="post">
13
14           <h3> Name: <input id="Name" type=text>
15
16           Category:  <select id="Category" size=1>
17                          <option>psychology</option>
18                          <option>business</option>
19                          <option>popular_comp</option>
20                      </select>
21
22           </h3>
23
24           <input type=submit value="Lookup">
25
26           <p>
27
28           <% for (int i=0; i <8; i++) { %>
29              <font size="<%=i%>"> Welcome to asp.net </font> <br>
30           <% }%>
31
32       </form>
33
34       </center>
35
36   </body>
37</html>
38
 

  VB Source

 
   Intro2_vb.aspx


 1 <%@ Page Language="VB" %>
 2<html>
 3   <head>
 4      <link rel="stylesheet"href="intro.css">
 5   </head>
 6
 7   <body>
 8
 9       <center>
10
11       <form action="intro2_vb.aspx" method="post">
12
13           <h3> Name: <input id="Name" type=text>
14
15           Category:  <select id="Category" size=1>
16                          <option>psychology</option>
17                          <option>business</option>
18                          <option>popular_comp</option>
19                      </select>
20
21           </h3>
22
23           <input type=submit value="Lookup">
24
25           <p>
26
27           <% Dim I As Integer
28              For I = 0 to 7 %>
29              <font size="<%=I%>"> Welcome to ASP.NET </font> <br>
30           <% Next %>
31
32       </form>
33
34       </center>
35
36   </body>
37</html>
38
39 
 

  學習C# Source Intro2_cs.aspx 與VB Source  Intro2_vb.aspx 的不同后,發現C#的代碼有些難度.特別是兩個循環上有很大區別,
c#


1<% for (int i=0; i <8; i++) { %>
2              <font size="<%=i%>"> Welcome to ASP.NET </font> <br>
3           <% }%>
4
VB


1 <% Dim I As Integer
2              For I = 0 to 7 %>
3              <font size="<%=I%>"> Welcome to ASP.NET </font> <br>
4           <% Next %>
5
VB還是很直觀,一直在學VB所以感覺很好理解.C#反而像是C語言.

 


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 黔东| 松溪县| 营山县| 霍城县| 肥城市| 拉萨市| 剑河县| 巴林左旗| 广平县| 新沂市| 洪江市| 郸城县| 绥棱县| 杂多县| 定襄县| 弋阳县| 茂名市| 彩票| 三亚市| 海口市| 永寿县| 长顺县| 漳平市| 高清| 永春县| 汾西县| 南乐县| 平湖市| 左云县| 仪征市| 黑山县| 章丘市| 东辽县| 大足县| 敖汉旗| 千阳县| 辽阳县| 濮阳市| 黑水县| 奉节县| 汽车|