14.9.8 Delegate equality operators
来源:互联网 发布:淘宝卖茶叶图片大全 编辑:程序博客网 时间:2024/06/15 17:13
Every delegate type implicitly provides the following predefined comparison
operators: :
bool operator ==(System.Delegate x, System.Delegate y);
bool operator !=(System.Delegate x, System.Delegate y);
Two delegate instances are considered equal as follows:
?If either of the delegate instances is null, they are equal if and only
if both are null.
C# LANGUAGE SPECIFICATION
168
?If either of the delegate instances has an invocation list (?2.1)
containing one entry, they are equal if
and only if the other also has an invocation list containing one entry, and
either:
?Both refer to the same static method, or
?Both refer to the same non-static method on the same target object.
?If either of the delegate instances has an invocation list containing two
or more entries, those instances
are equal if and only if their invocation lists are the same length, and
each entry in one?s invocation list
is equal to the corresponding entry, in order, in the other?s invocation
list.
Delegates of different types can be considered equal by the above
definition, as long as they have the same
return type and parameter types.
operators: :
bool operator ==(System.Delegate x, System.Delegate y);
bool operator !=(System.Delegate x, System.Delegate y);
Two delegate instances are considered equal as follows:
?If either of the delegate instances is null, they are equal if and only
if both are null.
C# LANGUAGE SPECIFICATION
168
?If either of the delegate instances has an invocation list (?2.1)
containing one entry, they are equal if
and only if the other also has an invocation list containing one entry, and
either:
?Both refer to the same static method, or
?Both refer to the same non-static method on the same target object.
?If either of the delegate instances has an invocation list containing two
or more entries, those instances
are equal if and only if their invocation lists are the same length, and
each entry in one?s invocation list
is equal to the corresponding entry, in order, in the other?s invocation
list.
Delegates of different types can be considered equal by the above
definition, as long as they have the same
return type and parameter types.
- 14.9.8 Delegate equality operators
- 14.9.4 Boolean equality operators
- 14.9.7 String equality operators
- 14.9.6 Reference type equality operators
- Python中的 equality operators
- Equality
- Operators
- Operators
- Operators
- Operators
- 14.9 Relational & type-testing operators
- 14.9.1 Integer comparison operators
- 14.9.3 Decimal comparison operators
- 14.9.5 Enumeration comparison operators
- Base equality
- 14.9.2 Floating-point comparison operators
- Java Basics Part 8/20 - Basic Operators
- delegate
- 14.9.3 Decimal comparison operators
- 14.9.4 Boolean equality operators
- 14.9.5 Enumeration comparison operators
- 14.9.6 Reference type equality operators
- 14.9.7 String equality operators
- 14.9.8 Delegate equality operators
- 14.9.9 The is operator
- 14.9.10 The as operator
- 14.10 Logical operators
- 14.11 Conditional logical operators
- 当Spring遇到Ruby
- ASP源码现阶段最好的保护方案软件特点:无需改动原网站代码,无需写成DLL。加解快速方便。加密后的密文能法解密。
- 图片等比例截取
- [免费]新增日期控件的下载