Generates hash code and equality check functions for the particular type.
Namespace: DotNext Assembly: DotNext.dll Syntaxpublic readonly struct EqualityComparerBuilder<T>
Type Parameters Name Description T
The type for which equality check and hash code functions should be generated.
Properties | Edit this page View Source ExcludedFieldsSets an array of excluded field names.
Declarationpublic string[] ExcludedFields { init; }
Property Value Type Description string[]
An array of excluded fields.
| Edit this page View Source SaltedHashCodeSet a value indicating that hash code must be unique for each application instance.
Declarationpublic bool SaltedHashCode { init; }
Property Value Type Description bool
true to include randomized salt data into hashing; false to use data from memory only.
Methods | Edit this page View Source Build()Generates implementation of equality comparer.
Declarationpublic IEqualityComparer<T> Build()
Returns Exceptions | Edit this page View Source Build(out Func<T?, T?, bool>, out Func<T, int>)
Generates implementation of GetHashCode() and Equals(object) methods for particular type T
.
public void Build(out Func<T?, T?, bool> equals, out Func<T, int> hashCode)
Parameters Type Name Description Func<T, T, bool> equals
The implementation of equality check.
Func<T, int> hashCodeThe implementation of hash code.
Exceptions Extension MethodsRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4