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
.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기