网站大量收购独家精品文档,联系QQ:2885784924

VB.Net - 运算符.pdf

  1. 1、本文档共9页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
VB.Net - 运算符

VB.Net - 运算符 运算符是⼀个符号,通知编译器执⾏特定的数学或逻辑操作。 VB .Net丰富的内置运算 符,并 供以下类型的常⽤运算符: 算术运算符 ⽐较运算符 逻辑/ 位运算符 位移位运算符 赋值运算符 其他运算符 本教程将介绍最常⽤的运算符。 算术运算符 下表显⽰了VB .Net⽀持的所有算术运算符。 假设变量A保持2,变量B保持7,则: 显⽰⽰例 运算符 描述 例 Raises one operand to the power of anothe ^ B^A will give 49 将⼀个操作数 升为另⼀个的权⼒ Adds two operand + A + B will give 9 添加两个操作数s ubtracts second operand from the first - 从第⼀个操作数中减去第⼆个操作数 A - B will give -5 Multiplies both operands * A * B will give 14 将两个操作数相乘 Divides one operand by another and returns a floating point result / 将⼀个操作数除以另⼀个操作数,并返回⼀个B / A will give 3.5 浮点结果 Divides one operand by another and returns an integer result \ 将⼀个操作数除以另⼀个操作数,并返回⼀个B \ A will give 3 整数结果 Modulus Operator and remainder of after an MOD integer division B MOD A will give 1 模数运算符和整数除法后的余数 ⽐较运算符 下表显⽰了VB .Net⽀持的所有⽐较运算符。 假设变量A保持10,变量B保持20,则: 显⽰⽰例 运算符 描述 例 Checks if the values of two operands are equal or = not; if yes, then condition becomes true . (A = B)是不正确的。 检查两个操作数的值是否相等; 如果是,则条 件变为真。 Checks if the values of two operands are equal or not; if values are not equal , then condition becomes true . (AB)为真。 检查两个操作数的值是否相等; 如果值不相 等,则条件为真。 Checks if the value of left operand is greater than the value of right operand; if yes, then condition becomes true . (A B)是不

文档评论(0)

l215322 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档