System::ObjectExt::Equals method

ObjectExt::Equals(const char_t(&), String) method

Substitution for C# Object.Equals calls working for any type in C++. Overload for string literal with string comparison.

template<size_t> static bool System::ObjectExt::Equals(const char_t(&obj)[N], String another)
ParameterDescription
NString literal size.
ParameterTypeDescription
objconst char_t(&)String literal.
anotherStringString.

ReturnValue

True if strings match, false otherwise.

See Also

ObjectExt::Equals(const double&, const double&) method

Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.

bool System::ObjectExt::Equals(const double &obj, const double &another)
ParameterTypeDescription
objconst double&LHS floating point value.
anotherconst double&RHS floating point value.

ReturnValue

True if obj and another are both NaN or equal, false otherwise.

See Also

ObjectExt::Equals(const float&, const float&) method

Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.

bool System::ObjectExt::Equals(const float &obj, const float &another)
ParameterTypeDescription
objconst float&LHS floating point value.
anotherconst float&RHS floating point value.

ReturnValue

True if obj and another are both NaN or equal, false otherwise.

See Also

ObjectExt::Equals(const T&, const T2&) method

template<typename T,typename T2> static std::enable_if<IsExceptionWrapper<T>::value, bool>::type System::ObjectExt::Equals(const T &obj, const T2 &another)

See Also

ObjectExt::Equals(const T&, const T2&) method

Substitution for C# Object.Equals calls working for any type in C++. Overload for smart pointer types.

template<typename T,typename T2> static std::enable_if<IsSmartPtr<T>::value, bool>::type System::ObjectExt::Equals(const T &obj, const T2 &another)
ParameterDescription
TFirst object type.
T2Second object type.
ParameterTypeDescription
objconst T&First object.
anotherconst T2&Second object.

ReturnValue

True if objects are considered equal, false otherwise.

See Also

ObjectExt::Equals(const T&, const T2&) method

Substitution for C# Object.Equals calls working for any type in C++. Overload for scalar types.

template<typename T,typename T2> static std::enable_if<!IsSmartPtr<T>::value &&std::is_scalar<T>::value, bool>::type System::ObjectExt::Equals(const T &obj, const T2 &another)
ParameterDescription
TFirst object type.
T2Second object type.
ParameterTypeDescription
objconst T&First object.
anotherconst T2&Second object.

ReturnValue

True if objects are considered equal, false otherwise.

See Also

ObjectExt::Equals(T, const T2&) method

Substitution for C# Object.Equals calls working for any type in C++. Overload for structure types.

template<typename T,typename T2> static std::enable_if<!IsExceptionWrapper<T>::value &&!IsSmartPtr<T>::value &&!std::is_scalar<T>::value, bool>::type System::ObjectExt::Equals(T obj, const T2 &another)
ParameterDescription
TFirst object type.
T2Second object type.
ParameterTypeDescription
objTFirst object.
anotherconst T2&Second object.

ReturnValue

True if objects are considered equal, false otherwise.

See Also