SByte.Equals 方法
定义
重载
| Equals(Object) |
返回一个值,该值指示此实例是否等于指定的对象。Returns a value indicating whether this instance is equal to a specified object. |
| Equals(SByte) |
返回一个值,该值指示此实例是否等于指定的 SByte 值。Returns a value indicating whether this instance is equal to a specified SByte value. |
Equals(Object)
返回一个值,该值指示此实例是否等于指定的对象。Returns a value indicating whether this instance is equal to a specified object.
public:
override bool Equals(System::Object ^ obj);
public override bool Equals (object obj);
public override bool Equals (object? obj);
override this.Equals : obj -> bool
Public Overrides Function Equals (obj As Object) As Boolean
参数
- obj
- Object
与此实例进行比较的对象。An object to compare with this instance.
返回
如果 true 是 obj 的实例并且等于此实例的值,则为 SByte;否则为 false。true if obj is an instance of SByte and equals the value of this instance; otherwise, false.
另请参阅
适用于
Equals(SByte)
public:
virtual bool Equals(System::SByte obj);
public bool Equals (sbyte obj);
override this.Equals : sbyte -> bool
Public Function Equals (obj As SByte) As Boolean
参数
返回
如果 true 的值与此实例相同,则为 obj;否则为 false。true if obj has the same value as this instance; otherwise, false.
实现
注解
此方法实现 System.IEquatable<T> 接口,并且执行的效果略优于, Equals 因为无需将 obj 参数转换为对象。This method implements the System.IEquatable<T> interface, and performs slightly better than Equals because it does not have to convert the obj parameter to an object.