码迷,mamicode.com
首页 > Windows程序 > 详细

vb.net 与 c# 运算符区别

时间:2015-09-04 18:24:46      阅读:180      评论:0      收藏:0      [点我收藏+]

标签:

vb.net vs c# 详细的Operators运算符区别

vb.net
=====================
Comparison
=  <  >  <=  >=  <>

Arithmetic
+  -  *  /
Mod
\  (integer division)
^  (raise to a power)

Assignment
=  +=  -=  *=  /=  \=  ^=  <<=  >>=  &=

Bitwise
And   Or   Xor   Not   <<   >>

Logical
AndAlso   OrElse   And   Or   Xor   Not

Note: AndAlso and OrElse perform short-circuit logical evaluations

String Concatenation
& 



c#
=====================
Comparison
==  <  >  <=  >=  !=

Arithmetic
+  -  *  /
%  (mod)
/  (integer division if both operands are ints)
Math.Pow(x, y)

Assignment
=  +=  -=  *=  /=   %=  &=  |=  ^=  <<=  >>=  ++  --

Bitwise
&   |   ^   ~   <<   >>

Logical
&&   ||   &   |   ^   !

Note: && and || perform short-circuit logical evaluations

String Concatenation
+ 

vb.net 与 c# 运算符区别

标签:

原文地址:http://www.cnblogs.com/lbnnbs/p/4782068.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!