Table of Contents

Method CreateHashCodeDeterministic

Namespace
PaintDotNet
Assembly
PaintDotNet.Fundamentals.dll

CreateHashCodeDeterministic(string)

Creates a hash code that does not change across different runs of the application, unlike string.GetHashCode() which is randomized by default. This is useful for scenarios like serialization where we want the hash code to be consistent across runs.

public static int CreateHashCodeDeterministic(string s)

Parameters

s string

Returns

int