Determines whether this instance and a specified string match.
[Visual Basic] Overloads Public Shared Function Equals( _ ByVal a As String, _ ByVal b As String _ ) As Boolean [C#] public static bool Equals( string a, string b ); [C++] public: static bool Equals( String* a, String* b ); [JScript] public static function Equals( a : String, b : String ) : Boolean;
Value | Condition |
---|---|
true | If both strings are case-sensitive and match exactly, otherwise false. |
true | If both strings are null. |
The Equals method compares two strings (a and b) to determine whether they match exactly and returns a Boolean representation of their relationship. The comparison is case-sensitive. Otherwise it returns false.
If both strings are null, they are considered equal.
String Class | String Members | System Namespace | String.Equals Overload List