Share via


Equals Method (Object)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Determines whether this instance and a specified object, which must also be a String object, have the same value.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Overrides Function Equals ( _
    obj As Object _
) As Boolean
public override bool Equals(
    Object obj
)
public:
virtual bool Equals(
    Object^ obj
) override
abstract Equals : 
        obj:Object -> bool 
override Equals : 
        obj:Object -> bool 
public override function Equals(
    obj : Object
) : boolean

Parameters

Return Value

Type: System. . :: . .Boolean
true if obj is a String and its value is the same as this instance; otherwise, false.

Remarks

This method performs an ordinal (case-sensitive and culture-insensitive) comparison.

.NET Framework Security

See Also

Reference

String Class

Equals Overload

System Namespace