xtd 0.2.0
Loading...
Searching...
No Matches

◆ get_hash_code()

template<typename type_t >
virtual xtd::size xtd::collections::generic::iequality_comparer< type_t >::get_hash_code ( const type_t &  obj) const
pure virtualnoexcept

Returns a hash code for the specified object.

Parameters
objThe xtd::object for which a hash code is to be returned.
Returns
A hash code for the specified object.
Remarks
Implement this method to provide a customized hash code for type type_t, corresponding to the customized equality comparison provided by the xtd::collections::generic::iequality_comparer::equals method.
Notes to Implementers
Implementations are required to ensure that if the xtd::collections::generic::iequality_comparer::equals method returns true for two objects x and y, then the value returned by the xtd::collections::generic::iequality_comparer::get_hash_code method for x must equal the value returned for y.