亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

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

14.7.4 Addition operator

2019-11-18 11:29:47
字體:
來源:轉載
供稿:網友

  For an Operation of the form x + y, binary operator overload resolution (?4.
2.4) is applied to select a
specific operator implementation. The operands are converted to the
parameter types of the selected
operator, and the type of the result is the return type of the operator.
The PRedefined addition operators are listed below. For numeric and
enumeration types, the predefined
addition operators compute the sum of the two operands. When one or both
operands are of type string,
the predefined addition operators concatenate the string representation of
the operands.
?Integer addition:
int operator +(int x, int y);
uint operator +(uint x, uint y);
long operator +(long x, long y);
ulong operator +(ulong x, ulong y);
In a checked context, if the sum is outside the range of the result type, a
System.OverflowException is thrown. In an unchecked context, overflows are
not reported and
any significant high-order bits outside the range of the result type are
discarded.
?Floating-point addition:
float operator +(float x, float y);
double operator +(double x, double y);
The sum is computed according to the rules of IEC 60559 arithmetic. The
following table lists the
results of all possible combinations of nonzero finite values, zeros,
infinities, and NaN?s. In the table, x
and y are nonzero finite values, and z is the result of x + y. If x and y
have the same magnitude but
opposite signs, z is positive zero. If x + y is too large to represent in
the destination type, z is an
infinity with the same sign as x + y. If x + y is too small to represent in
the destination type, z is a
zero with the same sign as x + y.

    y   +0  -0  +8  -8  NaN
x   z   x   x   +8  -8  NaN
+0  y   +0  +0  +8  -8  NaN
-0  y   +0  -0  +8  -8  NaN
+8  +8  +8  +8  +8  NaN NaN
-8  -8  -8  -8  NaN -8  NaN
NaN NaN NaN NaN NaN NaN NaN

?Decimal addition:
decimal operator +(decimal x, decimal y);
If the resulting value is too large to represent in the decimal format, a
System.OverflowException
is thrown. The scale of the result, before any rounding, is the larger of
the scales of the two operands.
Decimal addition is equivalent to using the addition operator of type
System.Decimal.
?Enumeration addition. Every enumeration type implicitly provides the
following predefined operators,
where E is the enum type, and U is the underlying type of E:
E operator +(E x, U y);
E operator +(U x, E y);
The operators are evaluated exactly as (E)((U)x + (U)y).
?String concatenation:
string operator +(string x, string y);
string operator +(string x, object y);
string operator +(object x, string y);
The binary + operator performs string concatenation when one or both
operands are of type string. If
an operand of string concatenation is null, an empty string is substituted.
Otherwise, any non-string
argument is converted to its string representation by invoking the virtual
ToString method inherited
from type object. If ToString returns null, an empty string is substituted.
[Example:
using System;
class Test
{
static void Main() {
string s = null;
Console.WriteLine("s = >" + s + "<"); // displays s = ><
int i = 1;
Console.WriteLine("i = " + i); // displays i = 1
float f = 1.2300E+15F;
Console.WriteLine("f = " + f); // displays f = 1.23E+15
decimal d = 2.900m;
Console.WriteLine("d = " + d); // displays d = 2.900
}
}
end example]
The result of the string concatenation operator is a string that consists
of the characters of the left
operand followed by the characters of the right operand. The string
concatenation operator never returns
a null value. A System.OutOfMemoryException may be thrown if there is not
enough memory
available to allocate the resulting string.
?Delegate combination. Every delegate type implicitly provides the
following predefined operator, where
D is the delegate type:
D operator +(D x, D y);
The binary + operator performs delegate combination when both operands are
of some delegate type D.
(If the operands have different delegate types, a compile-time error
occurs.) If the first operand is null,
Chapter 14 EXPressions
161
the result of the operation is the value of the second operand (even if
that is also null). Otherwise, if the
second operand is null, then the result of the operation is the value of
the first operand. Otherwise, the
result of the operation is a new delegate instance that, when invoked,
invokes the first operand and then
invokes the second operand. [Note: For examples of delegate combination,
see ?4.7.5 and ?2.3. Since
System.Delegate is not a delegate type, operator + is not defined for it.
end note]

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
亚洲级视频在线观看免费1级| 97人人爽人人喊人人模波多| 成人a免费视频| 性色av一区二区咪爱| 久久躁日日躁aaaaxxxx| 亚洲欧美制服丝袜| 丝袜美腿精品国产二区| 久久精品国产综合| 日本精品久久中文字幕佐佐木| 不卡av电影在线观看| 日韩精品视频在线播放| 亚洲天堂av在线免费观看| 中文字幕在线看视频国产欧美在线看完整| 色婷婷综合成人| 欧美重口另类videos人妖| 久久久免费高清电视剧观看| 日韩精品在线电影| 黄色精品在线看| 欧美日韩国产成人在线观看| 亚洲第一精品夜夜躁人人爽| 国产精品成人在线| 亚洲综合在线播放| 亚洲欧美中文在线视频| 亚洲另类图片色| 国产成人精品a视频一区www| 日韩国产中文字幕| 国产日韩在线精品av| 成人性教育视频在线观看| 亚洲最大福利网| 这里精品视频免费| 国产精品久久久久7777婷婷| 欧美寡妇偷汉性猛交| 成人情趣片在线观看免费| 成人黄色在线观看| 国产伦精品一区二区三区精品视频| 精品福利在线看| 日韩av在线免播放器| 九九久久综合网站| 亚洲激情视频在线播放| 日韩av综合网站| 97国产成人精品视频| 欧美性猛交xxxxx水多| 91丝袜美腿美女视频网站| 深夜福利亚洲导航| 国产精品一区二区3区| 欧美日韩免费区域视频在线观看| 欧美诱惑福利视频| 这里只有精品丝袜| 亚洲精品国产suv| 亚洲国产精品人人爽夜夜爽| 欧美激情va永久在线播放| 国产亚洲欧洲黄色| 国产成人久久精品| 日韩久久免费电影| 日韩电影在线观看中文字幕| 日本成人激情视频| 亚洲综合自拍一区| 亚洲欧美日韩中文视频| 国产精品电影网| 国产美女直播视频一区| 亚洲国产成人久久综合一区| 免费av在线一区| 人人爽久久涩噜噜噜网站| 日韩欧美黄色动漫| 午夜精品一区二区三区在线视| 热99在线视频| 久久影院模特热| 久久琪琪电影院| 久久久精品欧美| 正在播放国产一区| 国产精品久久久久久久app| 国产偷亚洲偷欧美偷精品| 国产美女久久久| 久久久久99精品久久久久| 国产精品揄拍500视频| 欧洲亚洲免费在线| 欧美中文字幕在线视频| 国产69精品久久久久99| 久久精品中文字幕| 最近2019中文字幕大全第二页| 2018国产精品视频| 色婷婷av一区二区三区在线观看| 国产欧美 在线欧美| 55夜色66夜色国产精品视频| 91成品人片a无限观看| 久久精品国产91精品亚洲| 96国产粉嫩美女| 日本精品免费一区二区三区| 欧美裸身视频免费观看| 国产欧美日韩中文字幕| 一区二区欧美久久| 92看片淫黄大片欧美看国产片| 永久免费毛片在线播放不卡| 久久天天躁日日躁| 欧美精品一本久久男人的天堂| 日韩女优人人人人射在线视频| 青青久久av北条麻妃海外网| 精品免费在线观看| 欧美亚洲国产日韩2020| 欧美另类极品videosbest最新版本| 国产小视频91| 国产噜噜噜噜噜久久久久久久久| 成人啪啪免费看| 国产精品男女猛烈高潮激情| 精品毛片网大全| 国产精品一区二区性色av| 97国产精品视频人人做人人爱| 亚洲色图偷窥自拍| 日韩欧美高清在线视频| 日韩精品欧美国产精品忘忧草| 91精品久久久久久久久| 日韩在线视频播放| 91亚洲精品在线| 色噜噜狠狠狠综合曰曰曰88av| 日韩男女性生活视频| 久久99久久久久久久噜噜| 蜜臀久久99精品久久久久久宅男| 国内揄拍国内精品| 亚洲成人av在线| 久久亚洲精品国产亚洲老地址| 欧美性jizz18性欧美| www高清在线视频日韩欧美| 亚洲午夜色婷婷在线| 日韩精品在线视频观看| 国产精品亚发布| 国产一区二区丝袜| 最近2019免费中文字幕视频三| 亚洲美腿欧美激情另类| 91久久精品国产91久久性色| 中文字幕日韩免费视频| 在线精品国产成人综合| 久久伊人色综合| 亚洲美女自拍视频| 成人黄色免费看| 久热99视频在线观看| 国产精品91久久久久久| 国内精品视频在线| 在线亚洲国产精品网| 欧美成人激情视频免费观看| 久久精品精品电影网| 久久中文字幕国产| 欧美网站在线观看| 91美女片黄在线观看游戏| 欧美另类69精品久久久久9999| 欧美日韩国产色| 日韩av大片免费看| 日韩欧美在线字幕| 国产精品精品久久久久久| 国产日韩中文字幕| 8090理伦午夜在线电影| 最新国产精品拍自在线播放| 51视频国产精品一区二区| 成人免费在线视频网址| 亚洲热线99精品视频| 国产精品视频精品视频| 亚洲精品在线看| 久久国产精品网站| 欧美一性一乱一交一视频| 国产美女91呻吟求| 成人a在线观看| 国产精品九九久久久久久久| 国产女同一区二区| 日韩av一卡二卡| 日韩高清免费观看|