HashCode.Add Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Add<T>(T) |
Adds a single value to the hash code. |
Add<T>(T, IEqualityComparer<T>) |
Adds a single value to the hash code, specifying the type that provides the hash code function. |
Add<T>(T)
- Source:
- HashCode.cs
- Source:
- HashCode.cs
- Source:
- HashCode.cs
Adds a single value to the hash code.
public:
generic <typename T>
void Add(T value);
public void Add<T> (T value);
member this.Add : 'T -> unit
Public Sub Add(Of T) (value As T)
Type Parameters
- T
The type of the value to add to the hash code.
Parameters
- value
- T
The value to add to the hash code.
Applies to
Add<T>(T, IEqualityComparer<T>)
- Source:
- HashCode.cs
- Source:
- HashCode.cs
- Source:
- HashCode.cs
Adds a single value to the hash code, specifying the type that provides the hash code function.
public:
generic <typename T>
void Add(T value, System::Collections::Generic::IEqualityComparer<T> ^ comparer);
public void Add<T> (T value, System.Collections.Generic.IEqualityComparer<T>? comparer);
public void Add<T> (T value, System.Collections.Generic.IEqualityComparer<T> comparer);
member this.Add : 'T * System.Collections.Generic.IEqualityComparer<'T> -> unit
Public Sub Add(Of T) (value As T, comparer As IEqualityComparer(Of T))
Type Parameters
- T
The type of the value to add to the hash code.
Parameters
- value
- T
The value to add to the hash code.
- comparer
- IEqualityComparer<T>
The IEqualityComparer<T> to use to calculate the hash code.
This value can be a null reference (Nothing in Visual Basic), which will use the default equality comparer for T
.