System::Object::ReferenceEquals method

Object::ReferenceEquals(String const&, std::nullptr_t) method

Specialization of Object::ReferenceEquals for case of string and nullptr.

bool System::Object::ReferenceEquals(String const &str, std::nullptr_t)
ParameterTypeDescription
strString const&String to compare to nullptr.

ReturnValue

true if string is null, false otherwise.

See Also

Object::ReferenceEquals(String const&, String const&) method

Specialization of Object::ReferenceEquals for case of strings.

bool System::Object::ReferenceEquals(String const &str1, String const &str2)
ParameterTypeDescription
str1String const&First string to compare.
str2String const&Second string to compare.

ReturnValue

true if strings match, false otherwise.

See Also

Object::ReferenceEquals(ptr const&, ptr const&) method

Compares objects by reference.

static bool System::Object::ReferenceEquals(ptr const &objA, ptr const &objB)
ParameterTypeDescription
objAptr const&First pointer to compare.
objBptr const&Second pointer to compare.

ReturnValue

True if pointers match and false otherwise.

See Also

Object::ReferenceEquals(T const&, std::nullptr_t) method

Reference-compares value type object with nullptr.

template<typename T> static std::enable_if<!IsSmartPtr<T>::value, bool>::type System::Object::ReferenceEquals(T const &objA, std::nullptr_t)
ParameterDescription
TType of object to compare.
ParameterTypeDescription
objAT const&First object to compare.

ReturnValue

Always returns false as value types cannot be nulled.

See Also

Object::ReferenceEquals(T const&, T const&) method

Compares objects by reference.

template<typename T> static std::enable_if<!IsSmartPtr<T>::value, bool>::type System::Object::ReferenceEquals(T const &objA, T const &objB)
ParameterDescription
TType of objects to compare.
ParameterTypeDescription
objAT const&First object to compare.
objBT const&Second object to compare.

ReturnValue

True if object addresses match and false otherwise.

See Also