⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch04-04-01.aspx

📁 深入浅出ASP.NET程序设计-源代码 书籍语言: 简体中文 书籍类型: 程序设计 授权方式: 免费软件 书籍大小: 627 KB
💻 ASPX
字号:
<%@ Page Language="VB" %>
<Html>
<Head>
<Title>VB.NET 操作符综合范例</TITLE>
</Head>
<Body>

<%
' 声明三个整数变量
Dim intA As Integer = 10, intB As Integer = 5 , intC As Integer = 3
'声明两个字符串变量
Dim strA As String = "ASP.NET", strB As String = "VB.NET"
' 声明两个布尔代数
Dim blnA As Boolean = True, blnB as Boolean = False

Response.Write("条件设置:<BR>")
Response.Write("整数条件:intA = " & intA & ",intB = " & intB & ",intC = " & intC & "<BR>" ) 
Response.Write("字符串条件:strA = """ & strA & """,strB = """ & strB & """<BR>")
Response.Write("布尔代数:blnA = " & blnA & ",blnB = " & blnB & "<BR><B>" )
Response.Write("括号优先级:")
Response.Write(" (intA - intB) * intC 结果为 " & ((intA - intB) * intC) & "<BR>" ) 
Response.Write("算数操作符:")
Response.Write(" intA - intB * intC 结果为 " & (intA - intB * intC)& "<BR>" ) 
Response.Write("比较操作符:")
Response.Write("intA > intB 结果为 " & (intA > intB) & " , ")
Response.Write("strA <> strB 结果为 " & (strA <> strB) & "<BR>")
Response.Write("逻辑操作符:")
Response.Write("blnA And blnB 结果为 " & (blnA And blnB) & " , ")
Response.Write("blnA Or blnB 结果为 " & (blnA Or blnB) & "<BR>")
Response.Write("指定操作符:")
intA *= intB
Response.Write(" intA *= intB 结果为 " & intA & "</B>")

%>
</Body>
</Html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -