PersistentStringHashFrom(StringBuilder, Int32, Int32, HashType) Method

Generates a persistent hash code for the Char-sequence in the specified StringBuilder that begins with startIndex and contains count characters, using the specified hashType.

Definition

Namespace: FolkerKinzel.Strings
Assembly: FolkerKinzel.Strings (in FolkerKinzel.Strings.dll) Version: 9.5.0+6287955de434d14f61638ea0c3c40b499ae05cd1
C#
public static int From(
	StringBuilder builder,
	int startIndex,
	int count,
	HashType hashType
)

Parameters

builder  StringBuilder
The StringBuilder whose Char-sequence is being hashed.
startIndex  Int32
The start index in builder.
count  Int32
The number of characters to hash.
hashType  HashType
The kind of hashcode to be generated.

Return Value

Int32
The hashcode.

Exceptions

ArgumentNullExceptionbuilder is null.
ArgumentOutOfRangeException

startIndex or count are smaller than zero or larger than the number of characters in builder

- or -

startIndex + count is larger than the number of characters in builder.

ArgumentExceptionhashType is not a defined value of the HashType enum.

See Also