Equals Method (Object)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Returns a value indicating whether this instance is equal to a specified object.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Overrides Function Equals ( _
val As Object _
) As Boolean
public override bool Equals(
Object val
)
public:
virtual bool Equals(
Object^ val
) override
abstract Equals :
val:Object -> bool
override Equals :
val:Object -> bool
public override function Equals(
val : Object
) : boolean
Parameters
- val
Type: System. . :: . .Object
The object to compare to this instance.
Return Value
Type: System. . :: . .Boolean
true if val is an instance of DateTime and equals the value of this instance; otherwise, false.
Remarks
The current instance and val are equal if their Ticks property values are equal. Their Kind property values are not considered in the test for equality.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.