String::Equals Method


Indicates whether the specified String has the same value as the current object.

bool String::Equals(Object^ str);

bool String::Equals(String^ str);


The object to compare.

true if str is equal to the current object; otherwise, false.

This method is equivalent to the String::CompareOrdinal Method. In the first overload, it is expected the str parameter can be cast to a String^ object.


Minimum supported client: Windows 8

Minimum supported server: Windows Server 2012

Namespace: Platform

Metadata: vccorlib.h

© 2015 Microsoft